at the moment i’m doing
$sql = "SELECT my_datetime FROM my_table ORDER BY my_datetime DESC LIMIT 1";
$result = mysql_query( $sql, $db );
if( !$result ) { die('Invalid query: ' . mysql_error()); }
$my_datetime = mysql_fetch_array($result,MYSQL_ASSOC);
$my_datetime = $my_datetime['my_datetime'];
to get the most recent datetime in the table. there will be a number of rows with that datetime. to get them i:
$sql = "SELECT * FROM my_datetime WHERE my_datetime = '$my_datetime'";
...
how can i do that with one sql query rather than two?
thanks.