php-db | 2001041
Date: 04/15/01
- Next message: Andrew Hill: "Re: [PHP-DB] 2-Table query"
- Previous message: Denis Mettler: "[PHP-DB] MySQL Data to a HTML-Form"
- In reply to: Steve Brett: "RE: [PHP-DB] OBDC date problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I suggest formatting the date with ODBC data escape syntax:
for a timestamp: '{ts, \'yyyy-mm-dd hh:mm:ss\'}'
or just a date: '{d \'yyyy-mm-dd\'}'
Best regards,
Andrew
--------------------------------------------
Andrew Hill . Director Technology Evangelism
OpenLink Software . www.openlinksw.com
Internet Data Integration Technology
On 4/11/01 6:00 AM, "Steve Brett" <SBrett <email protected>> wrote:
> i think you need
>
> SELECT * FROM news WHERE fdate >= '$date' AND tdate >= '$date'
>
> the dates have to be single-quoted in your query string
>
> i generally use
>
> $query = "SELECT * FROM news WHERE fdate >= '".$date."' AND tdate >=
> '".date."'";
>
> this may not be the best way and i would really appreciate it if someone
> could give me the 'correct' way. it's the way i used when i first started
> using php and have kinda kept it ....
>
> Steve
>
>> -----Original Message-----
>> From: Walter Franssen [mailto:w.franssen <email protected>]
>> Sent: 11 April 2001 10:47
>> To: php-db <email protected>
>> Subject: [PHP-DB] OBDC date problems
>>
>>
>>
>> Hello, i have some problems with date's in a query like
>>
>> SELECT * FROM news WHERE fdate >= $date AND tdate >= #date
>>
>> Can someone help me
>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
>> For additional commands, e-mail: php-db-help <email protected>
>> To contact the list administrators, e-mail:
>> php-list-admin <email protected>
>>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrew Hill: "Re: [PHP-DB] 2-Table query"
- Previous message: Denis Mettler: "[PHP-DB] MySQL Data to a HTML-Form"
- In reply to: Steve Brett: "RE: [PHP-DB] OBDC date problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

