php - SQL Query failing on Microsoft Access, working on MYSQL -


I'm trying to run a query on a Microsoft Access database by doing this

  $ Ticket_time = $ db- & gt; Prepare ("Choose Problems. Start_date, Problems. Problems, problems.id, tblusers.fname, tblnotes.id, tblnotes.note Fix problems by connecting problems.rep = tblusers.sid on the right join problems tblnotes.id = tblnotes .id WHERE 'start_date` & gt;' History 'and start_date position between 1 and 8 groups from start date by ASC;); $ Ticket_time- & gt; executed; while ($ line = $ ticket_time- & Gt; Fetch (PDO :: FETCH_ASSOC)) {// Some Things}  

This query works when I connect to mysql database This is the same question when connecting to the MS Access database, but the production database is Microsoft Access;

  Fatal error: Call to execute a non-object member function on line 84 < / Code> 

line 84 with $ ticket_time-> execute ();

A var_dump ($ ticket_time); Returns boolean false is connected to the MS Access database, but the expected return car when connected to the MySQL database I may be wrong query on the belief that connect to MS Access database, but I do not know how to start and where to troubleshoot.

What could be the reason for this?

For one, MS Access does not support backtracks to illustrate column identifiers, but Instead uses square brackets, so you

  WHERE 'start_date` & gt; Will have to change. From '$ history'  

to

  where [start_date]> '$ History'  

or even

  where start_date & gt; '$ History'  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -