Wayne_1998
Member
- Aug 11, 2013
- 60
- 0
Hey guys I have a problem with my fansite I get this on everypage: 'Warning: mysql_num_rows() expects parameter 1 to be resource, boolean'
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/u706337141/public_html/config.php on line 2 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/u706337141/public_html/config.php on line 14 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/u706337141/public_html/config.php on line 15 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/u706337141/public_html/config.php on line 16
<?php
$config = mysql_fetch_array(mysql_query("SELECT * FROM config"));
$site[title] = $config["title"];
$siteYou must be registered for see links
It should be "SELECT * FROM config", not "SELECT * FROM config.php". You are selecting from the table in MySQL, not the file in your script.That's not my config code.... (the first one)
Okay I fixed a bit but now here's on problem left: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/u706337141/public_html/config.php on line 2
and here is line 2 of my config code: $config = mysql_fetch_array(mysql_query("SELECT * FROM config.php"));