Jump to content

Archived

This topic is now archived and is closed to further replies.

StirCrazy

select count

Recommended Posts

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>

Share this post


Link to post
Share on other sites
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');

Share this post


Link to post
Share on other sites
Looks fine. Whats the problem?

Share this post


Link to post
Share on other sites
$sql = "select count(referrer) from users
where referrer='" . mysql_real_escape_string($_SESSION['user']) . "' and activated IN ('y', 'v')";

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.