if(!class_exists('MySql'))
{ include('MySql.php'); }
$sql=new MySql();
$sql->connect();
$sqlCommand="insert into `freecomputermarket`.`members`
(`UserName`,`Password`,`Email`,`BirthDate`,`RegisterationDate`,`ActivationCode`,
`ActivationLink`,`IsActive`,`Gender`)
values('$this->_userName','$this->_password','$this->_email','$this->_birthDate',
'$this->_registerationDate','$this->_activationCode','$this->_activationLink',
'$this->_isActive','$this->_gender')";
$sql->query($sqlCommand);
我如何插入自动增量ID?
答案 0 :(得分:2)
您已经很好地隐藏了MySql
课程的实施细节。
答案 1 :(得分:0)
$sql->query($sqlCommand);
$id = lastInsertId();