I am getting a few errors on one of my scripts. Hope someone can help me. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a1343289/public_html/styles.php on line 15 $config=mysql_fetch_array(mysql_query("select * from sbprj_config")); PHP: And this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a1343289/public_html/admin/index.php on line 5 $config=mysql_fetch_array(mysql_query("select * from sbprj_config")); PHP: Well...It's the same error. Hope someone has some suggestions
$config=mysql_fetch_array(mysql_query("SELECT * FROM sbprj_config")); PHP: Should work :| If doesn't, please PM me with your whole .php page.
Split your code into 2 queries and use mysql_error() to know the exact syntax error $result = mysql_query("select * from sbprj_config") or die(mysql_error()); $config=mysql_fetch_array($result); Code (php):
Try this: $query = "SELECT * FROM sbprj_config"; $result = mysql_query($query) or die(mysql_error()); $config = mysql_fetch_array($result) or die(mysql_error()); See if that helps
Thanks for all the suggestions guys, but instead of the error, I now only get: Table '*username*_get.sbprj_config' doesn't exist And I think I see the problem now...I can't find the file sbprj_cofig. Without this, of course, I will get an error...?