On Wed, 11 Jul 2007, Matt Leonhardt wrote:

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
SELECT MIN(id), MAX(id) FROM mytable

As an aside, is you are using associative arrays, be sure to use the
following keys:

$array['MIN(id)'] and $array['MAX(id)']

Just something I figured out recently :)

 or use select min(id) min, max(id) max from mytable

 then access as $array['min'] and $array['max']

---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[EMAIL PROTECTED]                                 http://www.angryox.com/
---------------------------------------------------------------------------
** PLEASE NOTE PurpleCow.com IS NOW AngryOx.com DO NOT USE PurpleCow.com **
** PurpleCow.com is now owned by City Auto Credit LLC as of May 23, 2007 **
---------------------------------------------------------------------------

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to