Re: MySQL error... but it works!!??
| From: | Adam Baratz | Date: | Sat, 05 Jan 2002 20:55:39 +0000 |
| Subject: | Re: MySQL error... but it works!!?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79574@lists.php.net to get a copy of this message | ||
> Does anyone have any idea why this is giving me a "Warning: Supplied
> argument is not a valid MySQL result resource in..." error?
You'll have to give more code, which line you get that error from, etc., to
give us a better idea why it's "not working."
However, a quick tip:
> $crdate = date("Y-m-d");
> $result = mysql_query("SELECT * FROM sites WHERE creation_date = '$crdate'
> AND status = 'T'");
These two lines can be condensed since MySQL has a built-in function to get
the current time/date:
SELECT * FROM sites WHERE creation_date = NOW() AND status = 'T'
-Adam