supplied argument is not a valid MySQL-Link resource
Posted: Tue Jan 21, 2003 12:30 pm
Hi,
I have the following code that connects to a database and updates an item in a record -
require_once('Connections/CLIENT_DATABASE.php');
$QUERY = "UPDATE website_info SET Pass ='".$_POST['Password']."' WHERE WebID ='".$_POST['ID']."'";
$INFO = QUERY_DATA($QUERY,$database_CLIENT_DATABASE,$CLIENT_DATABASE); // function in CLIENT_DATABASE file
$updated = mysql_affected_rows($INFO);
$results = mysql_fetch_row($INFO);
header('Location: acc_info.php');
exit;
on executing this script i get
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource
Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource
Now what i can't get is that although i get these errors the record is updated never the less.
even did it through mysql client and i got an error free output.
Now im thinking maybe its because of the way i have it required from a function. But i have this coding in another script which does it with out error. probably only difference is it SELECTS
Now my question is if its updating the record y am i getting the error
I have the following code that connects to a database and updates an item in a record -
require_once('Connections/CLIENT_DATABASE.php');
$QUERY = "UPDATE website_info SET Pass ='".$_POST['Password']."' WHERE WebID ='".$_POST['ID']."'";
$INFO = QUERY_DATA($QUERY,$database_CLIENT_DATABASE,$CLIENT_DATABASE); // function in CLIENT_DATABASE file
$updated = mysql_affected_rows($INFO);
$results = mysql_fetch_row($INFO);
header('Location: acc_info.php');
exit;
on executing this script i get
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource
Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource
Now what i can't get is that although i get these errors the record is updated never the less.
even did it through mysql client and i got an error free output.
Now im thinking maybe its because of the way i have it required from a function. But i have this coding in another script which does it with out error. probably only difference is it SELECTS
Now my question is if its updating the record y am i getting the error