Re: [nyphp-talk] MySQL Syntax questions

2008-05-29 Thread anoland
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: NYP

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Kristina Anderson
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 ge

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Rolan Yang
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

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Steve Manes
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); ___ New Yor

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Kristina Anderson
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? --Kristina > On May 28, 2008, at 4:42 PM, Kristina Anderson wrote: > > > I have two questions regarding syntax for MySQL queries. > > > > 1. I have complex queries where the

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Kristina Anderson
blah=blah OR foo=foo ) AND ( bar=bar OR etc=etc ) ) ) > > > - Original Message > From: Kristina Anderson <[EMAIL PROTECTED]> > To: talk@lists.nyphp.org > Sent: Wednesday, May 28, 2008 3:42:44 PM > Subject: [nyphp-talk] MySQL Syntax questions > > I have two

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Tim Lieberman
On May 28, 2008, at 4:42 PM, Kristina Anderson wrote: I have two questions regarding syntax for MySQL queries. 1. I have complex queries where there are lots of conditional statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR thing=thing OR blah=blah OR foo=foo AND bar=bar OR

Re: [nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Susan Shemin
Message From: Kristina Anderson <[EMAIL PROTECTED]> To: talk@lists.nyphp.org Sent: Wednesday, May 28, 2008 3:42:44 PM Subject: [nyphp-talk] MySQL Syntax questions I have two questions regarding syntax for MySQL queries. 1.  I have complex queries where there are lots of condi

[nyphp-talk] MySQL Syntax questions

2008-05-28 Thread Kristina Anderson
I have two questions regarding syntax for MySQL queries. 1. I have complex queries where there are lots of conditional statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR thing2=thing2... They are not erroring ou