i have 2 table:
TableA
Name Birth
Sandra Jan 1,1980
Bob Feb 12,1972
TableB
Name Birth
Hendra Jan 4,1950
Joeli Feb 15,1962
How do i select the oldest 2 people from both table in php???
I've tried:
<?php
$statement = "(SELECT name FROM TableA)
UNION
(SELECT name FROM TableB)
LIMIT 2 ORDER BY Birth";
$result = mysql_query($statement);
while ($row = mysql_fetch_array($result)) echo $row[name];
?>
but it didn't work..
any other solution??
Each table contains about 50.000 records, and i have a perfect good reason
to keep them in a separate table.
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/