I have this problem, I store a number in a database field. After a while I check if a value exist and if it does I take the number and add 1 this works fine up until 10, when I add a number to 10 it gets reset to 2 as if the zero is not counted for.
$row = pg_fetch_array($result,0);
$count = (int)$row[1]['count'];
$count++;
Table
Column | Type | Modifiers
----------+--------------------------+----------------------------------------------------
count | character varying(255) |
I also tried to change it to integer the column and also no luck.