Reply to Re: [PHP] sql question

Your name:

Reply:


Posted by Joseph Connolly on 04/07/05 20:30

if i understand you question...

SELECT columns
FROM table
WHERE (condition #1) AND (condition #2);

You can add many conditions. There are many ways to do this. This one is
probably the most simple for only two conditions. Depending on your
needs you also may need to create a subquery.

SELECT colummns
FROM table
WHERE (condition#1) AND (
SELECT columns
FROM table
WHERE (condition#1a);

The second is more useful in joins or when joining a table to itself.



William Stokes wrote:

>Hello,
>
>This is not a php but sql question. My apologies but I don't know any good
>sql forums and I know that someone here might be able to answer.
>
>OK so the question is. How to make a SELECT query with WHERE definition that
>requires 2 conditions to be satisfied so that the row gets selected?
>
>MySQL manual says"where_definition consists of the keyword WHERE followed by
>an expression that indicates the condition or conditions that rows must
>satisfy to be selected"
>
>I just don't know how to write the query
>
>Thanks a lot
>-Will
>
>
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация