Kristina, There are 2 good articles on melonfire.com that discuss subselects. You may find them enlightening.
-----Original Message----- From: "Kristina Anderson" <[EMAIL PROTECTED]> Date: Wednesday, May 28, 2008 10:40 pm Subject: Re: [nyphp-talk] MySQL Syntax questions To: NYPHP Talk <talk@lists.nyphp.org>Reply-To: NYPHP Talk <talk@lists.nyphp.org> these two don't take into consideration my conditional statements on >the two fields but I get the idea ...thanks > >Kristina > >> Steve Manes wrote: >> > Kristina Anderson wrote: >> >> Tim, with regard to the second query, I wanted the entire row not >> >> just the ID...do I need to do two queries to get that? >> > >> > Or a subquery: >> > >> > SELECT >> > * >> > FROM >> > table_foo >> > WHERE >> > id = (SELECT MAX(id) FROM table_foo); >> > >> > >> >> select * from table_foo order by id desc limit 1 >> _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php