For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > April 2004 > problem with a mySQL query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem with a mySQL query
alexandre plennevaux

2004-04-17, 1:30 am

hello mates !

just subscribed to this newsgroup through phpfreaks...


so here i am, a simple mySQL syntax question:
this is for a search engine crawling a database.

what is wrong with this query ? The use of two "WHERE" inside ?

SELECT * FROM NL_articles WHERE article_category ='3' AND WHERE
article_text LIKE '%comité%' ORDER BY article_date ASC

thanks a lot !



##-----------------------------------------------##
Article posted from PHP Freaks NewsGroups
http://www.phpfreaks.com/newsgroups
Get Addicted: alt.php.sql
##-----------------------------------------------##
Mike Peters

2004-04-18, 8:30 am

On 2004-04-15, alexandre plennevaux wrote:
> hello mates !
>
> just subscribed to this newsgroup through phpfreaks...
>
>
> so here i am, a simple mySQL syntax question:
> this is for a search engine crawling a database.
>
> what is wrong with this query ? The use of two "WHERE" inside ?
>
> SELECT * FROM NL_articles WHERE article_category ='3' AND WHERE
> article_text LIKE '%comité%' ORDER BY article_date ASC
>

You answered the question yourself. You only need the first WHERE.

--
Mike Peters
mike [-AT-] ice2o [-DOT-] com
http://www.ice2o.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com