sql statement question!!

wxdqz

New Member
How to combine the sql statement below into a single statement??

========== SQL 1 ================
$dbq = $db->execute("select message_id from tblMessages order by message_id desc limit 0,1;");
$max_msg_no = $dbq->fields['message_id'];
$dbq->close();

========== SQL2 ================
$dbq = $db->execute("select message_id from tblPOPMessages order by message_id desc limit 0,1;");
$max_msg_no2 = $dbq->fields['message_id'];
$dbq->close();

Thanks.
 
Back
Top