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> Quote 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'); Quote 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? Quote 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')"; Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/15198-select-count/#findComment-61367 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.