Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

 
 Fetch Row = null
Author: Bowmah (---.com)
Date:   02-16-05 15:22

I am using this fetch to see if userid exists. If it does, eacho user id. This part works. But, when it doesn't exist, I can't get the "could not run query" to work.

What am I missing?

if (!($link = mysql_connect ($DB_SERVER, $DB_LOGIN, $DB_PASSWORD))) {
echo "could not connect to database";
exit();
}

if (!($result = mysql_db_query($DB, "select userid from wb_auth where userid='$userid'"))) {
echo "could not run query";
exit();
}

while ($row=mysql_fetch_array($result)){

echo "Here is your ID: <b>$row[userid]</b></font>";

}

 Topics Author  Date
 Fetch Row = null  new
Bowmah 02-16-05 15:22 
 Re: Fetch Row = null  new
Bowmah 02-16-05 15:22 
 Re: Fetch Row = null  new
Bowmah 02-16-05 22:00 
 Re: Fetch Row = null  new
bastien 02-17-05 09:31 
 Re: Fetch Row = null  new
Bowmah 02-17-05 09:58 
Go to Top  |  Go to Topic  |  Flat View  |  Search 
  |  
New Topic
 Reply To This Message
 Your Name:
 Your Email:
 Subject:
Email replies to this thread, to the address above.
    

Provided By
Phorum