I\'m getting the following error
#1690 - BIGINT UNSIGNED value is out of range in \'(legends.spawns.quantity -
legends
spawns
quantity
sql_mode worked in the MySQL client and Adminer, but not in CodeIgniter, where it counts. Casting didn't help either.
sql_mode
A simple arithmetic operation did the trick:
id - id_ex*1000000000 = id_sm
id_sm + id_ex*1000000000 = id