Click to See Complete Forum and Search --> : [RESOLVED] php error


Heavy Metal
09-16-2006, 07:22 PM
I have this code $query = "UPDATE mainnews SET news = '".$news."', title = '".$title."' WHERE id = '".$id."'";
$result = mysql_query($query) or die('<b>Error: </b>'.mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/codersa/public_html/v3/cms/admincp/enpost.php on line 46

and that warning, and I dont know whats wrong, the bottom line of code, is line 46, i'v also tryed $row = mysql_fetch_array($result); by itself and that gave the same error, help please

Heavy Metal
09-16-2006, 08:20 PM
man i feel stupid, i was sitting there wondering why it wasn't working, then i thought "why do i need to fetch an array, im just updating a row, and then yeah, god dang im dumb. Sorry.