House ID Help?
#5

If you have records in the table that you want to keep, just execute:
pawn Код:
ALTER TABLE houses MODIFY house_id MEDIUMINT(4) PRIMARY KEY AUTO_INCREMENT;
so each house ID will be automatically regenerated starting from 1. The query for the table:
pawn Код:
CREATE TABLE `houses` (
 `house_id` mediumint(4) NOT NULL AUTO_INCREMENT,
 `hname` varchar(35) NOT NULL,
 `howner` varchar(21) NOT NULL,
 `hlocation` varchar(30) NOT NULL DEFAULT '*',
 `hpass` varchar(24) NOT NULL,
 `last_visited` int(11) unsigned NOT NULL DEFAULT '0',
 `x` float NOT NULL DEFAULT '0',
 `y` float NOT NULL DEFAULT '0',
 `z` float NOT NULL DEFAULT '0',
 `a` float NOT NULL DEFAULT '0',
 `cpx` float NOT NULL DEFAULT '0',
 `cpy` float NOT NULL DEFAULT '0',
 `cpz` float NOT NULL DEFAULT '0',
 `hvalue` int(12) unsigned NOT NULL DEFAULT '500',
 `hforsale` int(12) unsigned NOT NULL DEFAULT '0',
 `hstorage` int(12) unsigned NOT NULL DEFAULT '0',
 `hint` tinyint(2) unsigned NOT NULL DEFAULT '4',
 `hprivacy` tinyint(1) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`house_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
Reply


Messages In This Thread
House ID Help? - by DandyCorleone - 16.09.2016, 08:50
Re: House ID Help? - by Konstantinos - 16.09.2016, 08:53
Re: House ID Help? - by DandyCorleone - 16.09.2016, 09:17
Re: House ID Help? - by DandyCorleone - 16.09.2016, 10:28
Re: House ID Help? - by Konstantinos - 16.09.2016, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)