Roon
Member
- Mar 31, 2013
- 60
- 9
Okay, so after about 20 minutes of trying to get a mysql_query to work I've decided to ask you guys.
Basically, I have a class called amlinks and it is this...
This is giving me the errors "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Xampp\htdocs\ForumZer\inc\inc.main.php on line 61
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Xampp\htdocs\ForumZer\inc\inc.main.php on line 62"
If you need any more of my coding to help me, I'll be happy to send it.
Thanks in advance.
Basically, I have a class called amlinks and it is this...
PHP:
public function amlinker() {
$aretheyMOD = mysql_query("SELECT * FROM `users` WHERE `Username` = 'Roon' AND `isMod` = '1'");
$aretheyADMIN = mysql_query("SELECT * FROM `users` WHERE `Username` = 'Roon' AND `isAdmin` = '1'");
$rows_MOD = mysql_num_rows($aretheyMOD); --- LINE 61 ---
$rows_ADMIN = mysql_num_rows($aretheyADMIN); --- LINE 62 ---
if($rows_ADMIN = 1){
echo "SUP ADMIN";
} else {
echo "NOT ADMIN" . mysql_error();
}
}
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Xampp\htdocs\ForumZer\inc\inc.main.php on line 62"
If you need any more of my coding to help me, I'll be happy to send it.
Thanks in advance.