0

I am getting the following error and could not figure out what is the exactly the problem behind there. the error is following:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call,run_date) VALUES('login',1418873635.3977,1418873635.4,0.0023171901702881,'S' at line 1

Please help...

SAM Harun
  • 1
  • 4

1 Answers1

1

Your error will most likely be that call is a reserved word.

What you want to do is wrap them in back ticks (`)

`call`, run_date

Can't say much more without seeing your query. (What I've stated above is most likely the error)

Darren
  • 13,050
  • 4
  • 41
  • 79
  • Here is the Query: SELECT U.*,MLT.name as minstry_name,ALT.name as agency_name,SDLT.name as commission_name FROM pps2.user AS U LEFT JOIN pps2.ministry_lookup AS MLT on (U.ministry_id=MLT.id) LEFT JOIN pps2.agency_lookup AS ALT ON (U.agency_id=ALT.id) LEFT JOIN pps2.sector_division_lookup AS SDLT ON (U.sector_division=SDLT.id) WHERE U.username = 'bina' AND U.password = 'af7c14172fd3062c434bc56cb99fa703' AND U.status = 'Active' – SAM Harun Dec 18 '14 at 03:41
  • 1
    @SAMHarun Your error above implies an `INSERT` query but you posted a `SELECT` here. Which is it? – Michael Berkowski Dec 18 '14 at 03:42
  • Did you try what I just stated? @SAMHarun – Darren Dec 18 '14 at 03:45
  • Thanks for the help, I got my error in run_date.. I have fixed it and it works.. Many Thanks.. – SAM Harun Dec 18 '14 at 04:12