David Powers wrote:
> Steve wrote:
>> I just looked at a few of my recent queries and
found some that have
>> this:
>>
>> DATE_FORMAT(tbl_membership.m_renewdate, '%%b %%e
%%Y') AS renewdate
>>
>> is this also wrong? It works and was generated by
DW. I'm using ver.
>> 8.0.2 with the PHP hotfix.
>
> Yes, it is. I've never seen that before, but there
shouldn't be a
> doubling of the percentage signs.
I take it all back. I was just looking at the snippet of code
you
quoted. It's perfectly fine in the context of a Dreamweaver
recordset.
I've just double-checked some of my own code; it's the same -
and it
works perfectly.
The Dreamweaver-generated query uses sprintf(), which is why
the
percentage signs in DATE_FORMAT need to be escaped. Once that
has been
parsed by sprintf(), it will look like this:
DATE_FORMAT(tbl_membership.m_renewdate, '%b %e %Y') AS
renewdate
--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/