luvburn Posted September 18, 2006 Share Posted September 18, 2006 I got this error everytime i load mypageWarning: 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. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted September 18, 2006 Share Posted September 18, 2006 [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. Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 18, 2006 Share Posted September 18, 2006 You can verify what's happening with the query execution:[code]$result = mysql_db_query($dbc,$query) or die("Error: ". mysql_error(). " with query ". $query);// show problems[/code] Quote Link to comment Share on other sites More sharing options...
luvburn Posted September 18, 2006 Author Share Posted September 18, 2006 thanks..i got it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.