dani0157 Posted March 27, 2010 Share Posted March 27, 2010 Hello, I have a piece of code : if(!rq[0]) $error .= "SOME TEXT"; I think that if(!rq[0]) must be if(!rq0) Am i correct ? Link to comment https://forums.phpfreaks.com/topic/196713-if-statement/ Share on other sites More sharing options...
AdRock Posted March 27, 2010 Share Posted March 27, 2010 what is rq? an array? Link to comment https://forums.phpfreaks.com/topic/196713-if-statement/#findComment-1032752 Share on other sites More sharing options...
dani0157 Posted March 27, 2010 Author Share Posted March 27, 2010 Yes i think its a array. Look at this : require_once("menu.php"); $rq = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `users` WHERE `upline`='{$ir['username']}' AND `uplinetype` < 2 LIMIT 1")); if(!rq[0]) $error .= "SOME TEXT"; Link to comment https://forums.phpfreaks.com/topic/196713-if-statement/#findComment-1032756 Share on other sites More sharing options...
xoligy Posted March 27, 2010 Share Posted March 27, 2010 Try changing the rq[0] to $rq[0] the [x] refers to the colum in the db (id, name, password, email = 0, 1, 2, 3 or there name) Link to comment https://forums.phpfreaks.com/topic/196713-if-statement/#findComment-1032759 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.