cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting error for "Out of range value for column" in magento 1.9. How to enable this error?

Not getting error for "Out of range value for column" in magento 1.9. How to enable this error?

I have a column as 'count' in my table and I have set the column as 

Type - int
Length - 10
UNSIGNED
Null = true

If I am trying to insert a negative value in this column, so 0 is getting updated in the column and no error is generating. This query which I have created was using magento as :

$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
$connection->query('UPDATE test SET count = "-1" WHERE id = 21');

But when same thing I am doing using core PHP then I am getting the error as :
Error in query (1264): Out of range value for column 'count' at row 1

So how can I enable this error in magento as this is not stopping the code execution and we find it difficult to analysis the issue.