Page 1 of 1

how to select foxpro Date thru php ?

Posted: Wed Sep 24, 2003 1:46 am
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

Posted: Wed Sep 24, 2003 6:28 am
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 "