Hi, I have the following code, and for some reason, it returns an error code (Warning: Supplied argument is not a valid MySQL result resource in).
$sql="UPDATE availability SET status='$status',end_date='$eyear$emonth$eday'".
"WHERE user_id='$sUserID' AND room_code='$sRoomcode' AND start_date='$syear$smonth$sday'";
$result=mysql_query($sql);
$num = mysql_num_rows($result);
$feedback .= " Successfully Updated $num Availability. You Will Receive a Confirmation Email Soon ";
The line that seems to be failing in the error message seems to be
$num = mysql_num_rows($result);
But I copied this section straight from another piece of code that works. Can anyone see anything wrong?
Cheers
Ben
$sql="UPDATE availability SET status='$status',end_date='$eyear$emonth$eday'".
"WHERE user_id='$sUserID' AND room_code='$sRoomcode' AND start_date='$syear$smonth$sday'";
$result=mysql_query($sql);
$num = mysql_num_rows($result);
$feedback .= " Successfully Updated $num Availability. You Will Receive a Confirmation Email Soon ";
The line that seems to be failing in the error message seems to be
$num = mysql_num_rows($result);
But I copied this section straight from another piece of code that works. Can anyone see anything wrong?
Cheers
Ben