Re: Warning
| From: | Phil Driscoll | Date: | Sun, 10 Dec 2000 16:54:58 +0000 |
| Subject: | Re: Warning | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29564@lists.php.net to get a copy of this message | ||
A number of people have pointed out the missing AND in your sql, but the
fundamental error you are making is not to check the return values from yout
connect or query calls.
If either of them return 0, something went wrong, and you can use
mysql_error() to find out what.
Your code would become something along the lines of:
...
$dbh=mysql_connect($host, $user, $passwd) OR die(mysql_error());
$query=mysql_db_query($dbase, $Selstmt) OR die(mysql_error());
...
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org