MQSQL
#6

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:

Код:
[19:48:55] CMySQLHandler::Query(INSERT INTO `houses` (`id`) VALUES (1)) - An error has occured. (Error ID: 1062, Duplicate entry '1' for key 'PRIMARY')
your table's first field is the id.

That id is autoincremental. You shouldn't touch that.

Код:
CREATE TABLE IF NOT EXISTS `houses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
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.
Reply


Messages In This Thread
MQSQL - by tarmo - 04.12.2010, 15:28
Re: MQSQL - by dice7 - 04.12.2010, 15:37
Re: MQSQL - by tarmo - 04.12.2010, 15:45
Re: MQSQL - by Kaylux - 04.12.2010, 16:27
Re: MQSQL - by tarmo - 04.12.2010, 16:40
Re: MQSQL - by xxmitsu - 04.12.2010, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)