Hi,
So far the best way to troubleshoot mysql+php for me has been to add an "or die" after
the sql exec.
$crdate = date("Y-m-d");
$result = mysql_query("SELECT * FROM sites WHERE creation_date = '$crdate'
AND status = 'T'") or die ('CAN NOT EXEC SQL');
Or you can do
$sql = "SELECT * FROM sit
- Original Message -
From: "Bas van Rooijen" <[EMAIL PROTECTED]>
To: "Adam Baratz" <[EMAIL PROTECTED]>
Sent: Saturday, January 05, 2002 4:39 PM
Subject: Re: [PHP] MySQL error... but it works!!??
>
> maybe try:
>
> if (!$result)
> {
>
> 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("
Does anyone have any idea why this is giving me a "Warning: Supplied
argument is not a valid MySQL result resource in..." error?
The funny thing is that apart from that error message it works perfectly!!
---
$crdate = date("Y-m-d");
$result = mysql_query("SELECT * FROM s
4 matches
Mail list logo