Hiiii,
still checking my funny script
Now I have another problem
see here
CREATE TABLE `userregdata` (
`uid` mediumint(5) unsigned NOT NULL auto_increment,
`ufname` varchar(30) NOT NULL,
`ufamname` varchar(30) NOT NULL,
`username` varchar(30) NOT NULL,
`upswd` varchar(15) NOT NULL,
`uemail` varchar(40) NOT NULL,
`unumlev` int(3) NOT NULL default '1',
`uipadd` varchar(16) NOT NULL,
`uregdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`uid`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
as row (uid) is an auto-increment, the administrator should have row uid = 1
this is ok my script till now works fine
but the thing which is not fine, if I drop the database and need to install my script again
and when administrator register during installation process sometimes I found my script gave him uid number 3 , 4, 5 or 6 . . . etc instade of 1
how can I direct my script to uid = 1
how can I empty my record before the process of adminstrator registration
if( ! parent::getmail() == 0){
$QUERY = sprintf("INSERT INTO %s (`ufname`, `ufamname`,`username`, `upswd`,
`uemail`, `uipadd`, `uregdate`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', NOW())",
parent::BHL_DB_USER_TBL, parent::ClnUserFname(), parent::ClnUserFamName(), parent::ClnUserName(), parent::ClnUserPswd(),
parent::ClnUserEmAdd(), parent::CheckIpAdd(), parent::CurDate())or die(mysql_error());
$Result = mysql_query($QUERY);
}