April 15, 2007

MySQL 5 and Condition

The word “condition” is a reserved name in MySQL 5, apparently. It was not in MySQL 4. Thus, if you have a query where you do something like this:

SELECT the_field_name AS condition FROM the_table

That causes problems.

Filed under: MySQL — Michi @ 2:49 pm

Share this

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Reddit
  • StumbleUpon
  • del.icio.us
  • description
  • Technorati
  • Slashdot
  • co.mments
  • NewsVine

Related

ARG. I encountered another potential issue in PHP that is due to loose types that is common if you are using a database back end. $amount = 0.00;if($amount) Versus $amount = '0.00'; // how data from databases comesif($amount) Guess what...
Hah. It seems the crazy errors are plaguing me today. The latest one: Fatal error: Call to undefined function mysql_connect() ... Sweet... We moved to a new data center, and this error seems to be related to using PHP...

No Comments »

TrackBack URI | Blog RSS | Comment RSS

No comments yet.

What do you think?