Jump to content

mysql error


luvburn

Recommended Posts

I got this error everytime i load mypage

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ... line ..

the error is at the line '$myrow = mysql_fetch_array($result);' from this part

[code]
<?php
$query= "SELECT * FROM jawapan WHERE kategori = '$tanda' AND idsimptom = '$id'";
$result = mysql_db_query($dbc,$query);
$myrow = mysql_fetch_array($result);
?>
[/code]

Then i try to put '@'  in front of the error code, but the code returns nothing from the sql statement.
Link to comment
https://forums.phpfreaks.com/topic/21113-mysql-error/
Share on other sites

[code]<?php
$query= "SELECT * FROM jawapan WHERE kategori = '$tanda' AND idsimptom = '$id'";
$result = mysql_db_query($dbc,$query);
$myrow = mysql_fetch_assoc($result);
?>[/code]

All I did there was change array -> assoc. That should work the same unless you need it split up into arrays. Try that and see what happens.
Link to comment
https://forums.phpfreaks.com/topic/21113-mysql-error/#findComment-93781
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.