Jump to content

out of range


alhena

Recommended Posts

I have several columns in my table (int and decimal) that are restricted to a specific range (for example from 0 to 99.99). With a previous version of MySQL, I used to run a single query that would update these fields without checking what the actual number was, in order to minimize the amount of queries needed. If something was at 99.99 for example, and the query wanted to add 1, it stayed at 99.99, while the rest of the query would still get updated.

 

Now I have MySQL 5.0.51a, and I'm getting an "out of range" error for the same queries. If one of the values is lower or higher than the allowed range, it will abort the entire query.

 

Is there a way to tell MySQL to ignore the "out of range" and work as it previously did? Or do I have to pull all the data from the table first, have all the values checked, and selectively only update those that allow updating? Or is there another easier workaround?

Link to comment
https://forums.phpfreaks.com/topic/185087-out-of-range/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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