mysql_error()

MySQL + UPDATE SELECT Statement + #1093 – You can’t specify target table for update in FROM clause

What I Was Trying To Do I needed to do an Update Select using MySQL, I was expecting it to be something like: UPDATE MyTable SET HitCount = ( SELECT sp.HitCount+1 FROM MyTable sp WHERE sp.email = ‘test@email.com’ ) WHERE email = ‘test@email.com’ Error Message I Got Unfortunately, that returned the error message: #1093 – […]

How To Get Precise Error Messages For Issues Related To WordPress and MySQL

I’m sure you have noticed that for the 4 possible errors related to WordPress and MySQL, the error message is still the same. But as a web developer, when your system in on local development phase, you would surely want to get precise error messages.