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
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
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
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
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
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
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
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
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