Update DB Code
Posted: Thu Aug 11, 2005 8:54 am
Hi All,
I'm having some trouble calling this function to update the DB.
Can anyone give me any pointers? All it seems to be doing is resetting / reloading the page and giving errors :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
tia, Will
I'm having some trouble calling this function to update the DB.
Can anyone give me any pointers? All it seems to be doing is resetting / reloading the page and giving errors :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
tia, Will
Code: Select all
function updateSummary() {
if(empty($summaryId)) error_message('Empty Summary!');
$field_str .= " paperCategoryId = '$paperCategoryId', ";
$field_str .= " colloPaperName = '$colloPaperName', ";
$field_str .= " manufacturerName = '$manufacturerName', ";
$field_str .= " cpl = '$cpl', ";
$field_str .= " stockId = '$stockId', ";
$field_str .= " adhesiveId = '$adhesiveId', ";
$field_str .= " linerId = '$linerId', ";
$query = "UPDATE ausapapersummary SET $field_str WHERE summaryId = '$summaryId'";
$result = mysql_query($query);
if(!$result) error_message(sql_error());
$num_rows = mysql_affected_rows($link_id);