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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote msa ([EMAIL PROTECTED]):
> >

> $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."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to