|
发表于 2005-1-13 10:10:09
|
显示全部楼层
兔兔使用的是PEAR的DB类实现的对MySQL的操作,DB可以实现对大量数据库的兼容
这是兔兔在写注册时用到的
$table_fields = array('username','user_password','email','name','gender','native_place','education_level','political_level','education_background','seeking_career','contact_way','reg_date');
$table_values = array($username,$password,$email,$name,$gender,$native_place,$education_level,$political_level,$education_background,$seeking_career,$contact_way,$reg_date);
$table_name = 'user';
$sth = $db->autoPrepare($table_name, $table_fields, DB_AUTOQUERY_INSERT);
$db->execute($sth, $table_values);
建议你先去http://pear.php.net看看DB的使用 |
|