Re: min() in where clause

2002-11-13 Thread Joseph Bueno
That's right, I should have checked before clicking on Send ;) gerald_clark wrote: > That should not be DESC. > That will give the max value. > > Joseph Bueno wrote: > > > Erwin Ulreich wrote: > > > > > > > >> I want to code the following in one statement: > >> > >> select min(field1) from table1

Re: min() in where clause

2002-11-13 Thread Joseph Bueno
Erwin Ulreich wrote: > I want to code the following in one statement: > > select min(field1) from table1; > $res=result of the query > select * from table1 where field1=$res; > > does anyone know? > select * from table1 order by field1 desc limit 1 --

min() in where clause

2002-11-13 Thread Erwin Ulreich
I want to code the following in one statement: select min(field1) from table1; $res=result of the query select * from table1 where field1=$res; does anyone know? - Before posting, please check: http://www.mysql.com/manual.php