Good day all,
I am using the following code to confirm that the recordsets in two different tables are updated:
// Use the mysql_affected_rows function to help confirm that the record was successfully updated in the REQUIREMENTS table
$affected_rows = mysql_affected_rows($query);
if($affected_rows=="1") {
print "Record successfully updated in REQUIREMENTS table"; }
else {
print "Record update failed in REQUIREMENTS table"; }
// Use the mysql_affected_rows function to help confirm that the record was successfully updated in the REQ_RESOURCES table
$affected_rows_02 = mysql_affected_rows($query_02);
if($affected_rows_02=="1") {
print "Record successfully updated in REQ_RESOURCES table"; }
else {
print "Record update failed in REQ_RESOURCES table"; }
When executing the complete script, the recordsets are being updated successfully. However, the validation that I was hoping to achieve using the code above is returning the following errors:
Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in /home/public_html/requirements/update_requirements_NEW_WINDOW.php on line 120
Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in /home/public_html/requirements/update_requirements_NEW_WINDOW.php on line 123
I have reviewed the PHP manuals and all the other PHP references I can find on this function, and can't seem to find anything wrong. Help!