View Single Post

  #3 (permalink)  
Old 11-28-2005
Peter
 
Posts: n/a
Default Re: selecting by date

Bill Karwin <bill@karwin.com> wrote:
> Peter wrote:
>> echo "SELECT * FROM $tblPosts " .
>> "WHERE MONTH(postDate)<=$month & YEAR(postDate)<=$year " .

>
> The & symbol is not a boolean AND in SQL.
>
> In MySQL, this is a bitwise AND operator, which may have different
> behavior than you expect when applied to boolean terms.
>
> Try the AND operator instead.
>
> Regards,
> Bill K.


Oh, good gravy!!! How embarrasing!

Thanks for clearing that up. *sheepish grin*

Pete
Reply With Quote