![]() |
[HELP]mysql_fetch_array() expects parameter 1 to be resource, boolean given in....
Error:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\panel.php on line 12 Code: PHP Code:
|
You have no error handling in here.
Your query has simply failed. The easiest way to determine why is to tack on an or die(mysql_error()); to the end of the mysql_query call. It will be a structural fault on it, not a data one (data/logic errors would produce empty resultsets, not false). |
Actually, the reason is obvious:
Code:
SELECT * from members-profile-info where username = '$uname'"Quote:
YOU CAN NOT USE A MINUS SIGN IN THE MIDDLE OF A NAME! Well, fortunately, with MySQL, you can. But if you do so, you *MUST* then tell MySQL that you are using a non-standard name by enclosing the entire name in back ticks (the ` character...shares a key with ~ normally). So: Code:
$getuprofile = |
Thanks :D
I replaced PHP Code:
PHP Code:
|
But read what I said: There is a very very good chance that you should be making only *ONE* SQL query there, *NOT* two!!!
Without seeing more of the page, I can't be sure, but I would give 3 to 1 odds, sight unseen. |
Just for example, try something like:
Code:
$sql = "SELECT m.userame, p.fullname |
| All times are GMT +1. The time now is 10:04 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.