Re: Help with MySQL script
| From: | Rasmus Lerdorf | Date: | Tue, 25 Jul 2000 21:49:53 +0000 |
| Subject: | Re: Help with MySQL script | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1476@lists.php.net to get a copy of this message | ||
> $link = mysql_connect ($server, $username,$password);
> if($link == '1')
This is a very bad idea. $link is not guaranteed to be 1 at all. $link
is just a resource id. It can be any positive integer. So,
if($link) would be a better check.
As for why it isn't working, try calling mysql_error() after your query
and see what it says.
-Rasmus