Tried several different variants trying to get this to work with no success. When i run these queries separately they work fine, but when i run them together [as below] no results are return. What am i doing wrong?
Code extract:
//run first query....
$result = mysql_query("SELECT count(id) FROM table WHERE first_reg_time LIKE $query_date1%'");
//store result....(data1)
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$data1 = $row[0];
}
//run second query....
$result = mysql_query("SELECT count(id) FROM table WHERE first_reg_time LIKE $query_date2%'");
//store second result....(data2)
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$data2 = $row[0];
}
mysql_free_result($result);
Any help greatly appreciated.