Hey Guys,
I know this may sound retarded but I must have hit a wall or something.
I am trying to echo a report that will count 2 types of information. Members that have a specific gender, who have been activated, between dates X and Y. Then Members with a specific gender who have NOT been activated, between dates X and Y. So far I have a function that looks like this:
function active_info($date1,$date2) {
$query = mysql_query("SELECT * FROM users WHERE gender='male' AND date_registered BETWEEN '$date1' AND '$date2'");
$count_query = mysql_num_rows($query);
echo "There are currently $count_query user(s) who are male and registered between dates $date1 and $date2";
}
BUT,
I need to change it to look something like this:
function active_info($date1,$date2) {
$query = mysql_query("SELECT * FROM users WHERE gender='male' AND activated='yes' AND date_registered BETWEEN '$date1' AND '$date2'");
$count_query = mysql_num_rows($query);
echo "There are currently $count_query user(s) who are male and registered between dates $date1 and $date2";
}
But, as we all know, that won't work.
Will you please help me out. Lol
Thank you!


Sign In
Create Account


Back to top









