Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.