HELP ME WITH MY FANSITE!

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'
 

Wayne_1998

Member
Aug 11, 2013
60
0
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

Here's my config.php

<?php
$config = mysql_fetch_array(mysql_query("SELECT * FROM config"));
$site[title] = $config["title"];
$site
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,923
I'm assuming that you are not properly accessing your database, or something along those lines.

If your "var_dump()" you $config and it returns null, that is your issue.
 
Last edited:

Wayne_1998

Member
Aug 11, 2013
60
0
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"));
 
Last edited by a moderator:

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,923
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"));
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.
 

Users who are viewing this thread

Top