*******************
On 4/6/2005, "Wade" <[EMAIL PROTECTED]> wrote:
I started getting the following error today - but I have not changed
this page in weeks...?
*/*/*/*Warning*: mysql_fetch_array(): supplied argument is not a valid
MySQL result resource
/*/*/*
This is the code that I have always used to access the db....
$sql = "SELECT username, password FROM user WHERE username =
'".$user."'
AND password ='".$pass."'";
$result = mysql_query($sql, $connection);
while ( $row = mysql_fetch_array($result)){
Wade
*******************
Mike Franks' reply:
Wade, I suspect either:
1) you're not successfully connecting to the data base
2) there's some other problem accessing your 'user' table in the data
base
The error message is telling you something is wrong with $result.
Try adding an "or die" clause to mysql_query(...), or try running your
query directly against the data base.
Mike
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/