Knowledgebase

mysql_fetch_assoc(): Help need

Posted by galleline, 10-22-2010, 07:35 AM
I have move my site plesk to Cpanel and site is working normally but i have some of error log billow, How i fix this problem [21-Oct-2010 18:12:29] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****ego/public_html/recent_panel.php on line 17 [21-Oct-2010 18:12:29] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****ego/public_html/recent_panel.php on line 54 [21-Oct-2010 18:12:29] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****ego/public_html/recent_panel.php on line 92 [22-Oct-2010 00:35:35] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****ego/public_html/cat_panel.php on line 17 How i fix this ?

Posted by fabin, 10-22-2010, 07:46 AM
The result obtained from mysql_query() is false, which is the reason you're getting this error. When it returns false, it means there is errors in query or there are problems with database/tables.

Posted by galleline, 10-22-2010, 07:49 AM
do you mean, i have problem with my database ?

Posted by fabin, 10-22-2010, 07:52 AM
That is one possibility. Try to find the exact sql query it is trying to execute and execute it from phpmyadmin or mysql command line, and see the result it is returning.

Posted by galleline, 10-22-2010, 08:06 AM
I have update EasyApache

Posted by fabin, 10-22-2010, 08:08 AM
Did that fix it?

Posted by galleline, 10-22-2010, 08:18 AM
not fix

Posted by fabin, 10-22-2010, 08:22 AM
Its just a warning. If all features in the website are correctly working, you may ignore it.

Posted by galleline, 10-22-2010, 08:31 AM
object width=\"425\" height=\"325\"> why i have so many \\\\ in my youtube code after add it to my site

Posted by max_, 10-22-2010, 10:38 AM
Edit: sorry, wrong answer. Lol, dont know how to delete my response Last edited by max_; 10-22-2010 at 10:45 AM. Reason: my bad: i didnt see warning was from cpanel

Posted by lynxus, 10-22-2010, 10:56 AM
Looks like they have been escaped ( the backslash is used to stop php from ending or reading the ".. Ie: It will ignore the " at runtime.

Posted by galleline, 10-22-2010, 11:36 AM
How i fix it ?

Posted by LnxtecH, 10-23-2010, 02:22 AM
To remove all the slashes, use replace or sed.

Posted by galleline, 10-23-2010, 05:49 AM
after delete \ and when i go to edit again i can see same problem \

Posted by fabin, 10-23-2010, 06:59 AM
From where are you trying to edit it? May be, you have to use stripslashes() in PHP, if you are trying to fetch it from database.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
HostingLite/HiYaCorp (Views: 618)
Servint Outage: ETA? (Views: 645)


Language:

Client Login

Email

Password

Remember Me

Search