16.09.2016, 08:53
cache_insert_id returns 0 if the column is not set as A_I (auto increment) in R39-6 and below. In the INSERT query, set house_id as NULL or remove it completely and it will be auto generated. If you have NO_AUTO_VALUE_ON_ZERO sql mode disabled then you can use 0 but it's still not recommended as it causes few problems with mysqldump.