StirCrazy Posted July 20, 2006 Share Posted July 20, 2006 maybe it's just the way I'm writing it but keep getting an error when modifying the below line:-select count(referrer) from users where referrer='" . mysql_real_escape_string($_SESSION['user']) . "' and activated='y'");I Need referrer = $_SESSION['user'] and activated to = 'y' or 'v');Can anyone help?Many thanks,S.C> Link to comment https://forums.phpfreaks.com/topic/15198-select-count/ Share on other sites More sharing options...
redarrow Posted July 20, 2006 Share Posted July 20, 2006 select count(referrer) AS $me from users where referrer='" . mysql_real_escape_string($_SESSION['user']) . "' and activated='y'");$me= $_SESSION['user'] and activated to = 'y' or 'v'); Link to comment https://forums.phpfreaks.com/topic/15198-select-count/#findComment-61356 Share on other sites More sharing options...
trq Posted July 20, 2006 Share Posted July 20, 2006 Looks fine. Whats the problem? Link to comment https://forums.phpfreaks.com/topic/15198-select-count/#findComment-61357 Share on other sites More sharing options...
Barand Posted July 20, 2006 Share Posted July 20, 2006 $sql = "select count(referrer) from users where referrer='" . mysql_real_escape_string($_SESSION['user']) . "' and activated IN ('y', 'v')"; Link to comment https://forums.phpfreaks.com/topic/15198-select-count/#findComment-61363 Share on other sites More sharing options...
StirCrazy Posted July 20, 2006 Author Share Posted July 20, 2006 Nice one Barand: (cheers guys) YAY! Soooo glad I found this forum ;D Link to comment https://forums.phpfreaks.com/topic/15198-select-count/#findComment-61367 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.