04.12.2010, 16:58
Let me get this clear.. You can't load it from the database to pawn array ? or save(insert) a new house into the database?
Because if it's the sacond case, then this is the problem:
your table's first field is the id.
That id is autoincremental. You shouldn't touch that.
That's the entry ID not the house id. You should add another field in that table witch would be house ID.
Seems like your GetNewHouseID() is not working well, and doesn't gets you the next free id properly.
Because if it's the sacond case, then this is the problem:
Код:
[19:48:55] CMySQLHandler::Query(INSERT INTO `houses` (`id`) VALUES (1)) - An error has occured. (Error ID: 1062, Duplicate entry '1' for key 'PRIMARY')
That id is autoincremental. You shouldn't touch that.
Код:
CREATE TABLE IF NOT EXISTS `houses` ( `id` int(11) NOT NULL AUTO_INCREMENT,
Seems like your GetNewHouseID() is not working well, and doesn't gets you the next free id properly.