Re: WHERE clause...getting closer

From: Date: Wed, 05 May 2004 12:06:36 +0000
Subject: Re: WHERE clause...getting closer
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-185413@lists.php.net to get a copy of this message
Curt, thanks, your code works perfectly. Can I ask you two questions? 1. I am not sure what you mean by adding an index. I looked in the mySQL help files and from what I can figure, I have already done that... 2. Now that the code actually works, we have come up with an issue. When the current e-news newsletter (the table holds the current AND the archive enews newsletters) doesn't get updated until a few days into the month, then the page will be blank until she puts articles in for that month......is there a way to just say "show me the articles with the most current dates" ? thanks "Curt Zirzow" <php-general@zirzow.dyndns.org> wrote in message news:20040505005247.GO26014@bagend.shire... > * Thus wrote msa (melissa@maddesignusa.com): > > > $query_rsENews = 'SELECT * FROM NewsArchive > WHERE datePublished >= DATE_FORMAT(NOW(), "%Y-%m-01") > ORDER BY sortBy DESC'; > > And add an index on the datePublished column. You'll notice a > considerable speed difference. > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#185413) next »