Apologies for the title, I am wanting to run a query like so:
$query = mysql_query("
select * from taskdetail
where userid = '" . $rec['id'] . "'
and comp_status = '0'
and duedate > '" . date("Y-m-d") . "'
order by duedate,importantlevel ASC
LIMIT " . $getnextrecord . " , $limit
");
and then run one like so
$query_noduedate = mysql_query("
select * from taskdetail
where userid = '" . $rec['id'] . "'
and comp_status = '0'
and duedate = '0000-00-00'
") or die(mysql_error());
I would like the results of the second query (tasks with no duedate) to appear below the first queries results, (almost as if it is the results of the first query).
The reason being is I have lots of extra functionailty that alters the number of tasks you see, so eg if the user had selects to see one result and click next it currently goes through each task, I simpy want to kind of append the second queries results at the end of the first instead of having two sets of results.
I could combine the queries together eg:
$query = mysql_query("
select * from taskdetail
where userid='" . $rec['id'] . "'
and comp_status='0'
and ( duedate > '" . date("Y-m-d") . "' or duedate = '0000-00-00' )
order by duedate,importantlevel ASC
LIMIT " . $getnextrecord . " , $limit");
However, the tasks with the duedate of 0000-00-00 will appear at the top.
Not sure of the best solution
Cheers