PDA

View Full Version : mysql_fetch_assoc error/problem


XplicitMarine
08-12-2006, 07:11 AM
Hi, im new to PhpDig, i signed up in hope to find some help :)

im also new to PHP and MySQL, altho im not dumb and i have done a fair share of reading some stuff and fooling around with pre-made stuff. but onto the purpose of this thread.

I have website which was donated to me, to use for whatever purpose i want, altho when i set it up it had some SQL problems at first (trying to read a database that didnt exist) i fixed that and some other problems, altho since i dont know the PHP code i can only find my way around pre-made stuff, i got stuck.

im getting this error on my page "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/*******/template_manage.php on line 164"

i tryed reading up on just mysql_fetch_assoc, no use, didnt help me.

on line 164 of that page is this(Altho the whole might be needed to help me tho, just let me know)

160 if(!empty($_SESSION['online_user'])){ $this->general_layout[middle][] = "general/middle/user_options.php"; }
161 $this->general_layout[middle][] = "leagues/middle/top5.php";
162 $this->general_layout[middle][] = "leagues/middle/map_rotation.php";
163 $this->admin_layout[middle][] = "admin/general/middle/sidebar.php";
164 if(mysql_fetch_assoc(mysql_query("select `userIP` from `banned_ip` where (userIP='".$_SERVER['REMOTE_ADDR']."')"))) {
165 $go="banned";
166 }
167 switch($go) {

hopefully someone could help me please. thanks.

(if more information is needed to help me out, just let me know ill get it)