dear friends i try to getting some records from a database (Pardox) while giving a string value in date script is
$cust=$REQUEST["cust"];
$date1 = "2004/08/23";
$date2 = "2004/08/29";
//$date1=$REQUEST["date1"];
//$date2=$_REQUEST["date2"];
$conn=odbc_connect('abc','xyz','xyz');
$sql = "SELECT CRPROCEI.Specie,CRPROCEI.Projected,CRPROCEI.Ceiling
FROM CRPROCEI
WHERE Customer='".$cust."' AND SDate
BETWEEN '2004/08/23' AND '2004/08/29'";
echo $sql."<br>";
$result=odbc_exec($conn,$sql) or die(odbc_error());
while($row=odbc_fetch_array($result))
{
echo $row["Specie"]."".$row["Projected"]."".$row["Ceiling"]."@@";
}
but i receive this error (since this code work nice in localhost but give error on net site which using paradox sever)
which give this error
Warning: odbc_exec(): SQL error: [MERANT][ODBC Paradox driver]Incompatible datatypes in expression : BETWEEN , SQL state 37000 in SQLExecDirect in C:\Inetbump\fif\crprocei.php on line 13
37000
and line 13 is
$result=odbc_exec($conn,$sql) or die(odbc_error());
also i print the query and it show in this page when i brows like this
SELECT CRPROCEI.Specie,CRPROCEI.Projected,CRPROCEI.Ceiling FROM CRPROCEI WHERE Customer='2100' AND SDate BETWEEN '2004/08/23' AND '2004/08/29'
so please guid me what i do