how to select foxpro Date thru php ?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

how to select foxpro Date thru php ?

Post by valen53 »

i have a foxpro DB, i using ODBC to connect it.
I face a problem now, that is

Code: Select all

$date = "2003-09-26" ;

$query = "SELECT id,name,resign FROM employee WHERE resignDate = '$date' "
$result = odbc_exec($pr, $query);
i can't select out any result. b'cos the format $date incorrect to the foxpro DB .

anyone have solution to solve it ??
thank u
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

Post by valen53 »

i solve the prolem.
the date changing to this format

Code: Select all

$date = "{^$date_from}" ;
then
this $date no need ' '

Code: Select all

$query = "SELECT id,name,resign FROM employee WHERE resignDate = $date "
Post Reply