Jump to content

PHP Date Question


bCourtney07

Recommended Posts

Here is my select statement

SELECT Employee_ID, Miles, Activity, Minutes, Date 
FROM Activity_Log 
WHERE Employee_ID = '{$_POST["Employee_ID"]}'

 

I'm using a MS Access Database with an adodb dsn-less connection.

 

<?php
$conn = new COM ("ADODB.Connection") or die("Cannot start ADO");
$connStr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=F:\Wellness Program\HR Employee Wellness Program.mdb;";
$conn->open($connStr); //Open the connection to the database
?>

 

 

I want to narrow it down so it'll select information that is dated 01/02/2008 to 08/15/2008.  How can I accomplish this?  ???

Link to comment
https://forums.phpfreaks.com/topic/90724-php-date-question/
Share on other sites

Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft OLE DB Provider for ODBC Drivers Description: 
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Employee_ID = 'bcourtney' 
WHERE Date > 01/02/2008 AND Date < 08/15/2008'. in F:\InetPub\wwwroot\WellnessProgram\DisplayProgress2.php on line 10

 

???

 

What am I doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/90724-php-date-question/#findComment-465033
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.