kevincro Posted March 23, 2008 Share Posted March 23, 2008 Fatal error: Can't use function return value in write context in public_html/gearprocess.php on line 19 Here is the code I'm working with: if($gear == '4'){ mysql_query("DELETE FROM gear WHERE user = '$user'"); }else{ $result = mysql_query("SELECT * FROM gear WHERE user = '$user'"); (This is line 19) if(mysql_num_rows($result)='0'){ mysql_query("INSERT INTO gear VALUES ('$user','$imposer','$gear','$reason')"); }else{ mysql_query("UPDATE gear SET gear = '$gear' WHERE user = '$user'"); mysql_query("UPDATE gear SET reason = '$reason' WHERE user = '$user'"); } } Link to comment https://forums.phpfreaks.com/topic/97522-what-does-this-error-mean/ Share on other sites More sharing options...
wildteen88 Posted March 23, 2008 Share Posted March 23, 2008 Line 19 should be: if(mysql_num_rows($result)=='0'){ Link to comment https://forums.phpfreaks.com/topic/97522-what-does-this-error-mean/#findComment-498967 Share on other sites More sharing options...
kevincro Posted March 23, 2008 Author Share Posted March 23, 2008 That worked perfectly. Thanks so much. Kevin Link to comment https://forums.phpfreaks.com/topic/97522-what-does-this-error-mean/#findComment-498969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.