$result_this=mysqli_query(数据库连接对象,"SHOW TABLES FROM $数据库名");
获取一个表的所有字段,并且干入array
$tot_column=array();$con=mysqli_connect($this->hostName,$this->usrName,$this->passWd,$this->dbName)ordie("Can not connect to a MySQL Server");$sql="SELECT * FROM $this->memoTable";if($res=mysqli_query($con,$sql)){// 获取一个表的所有字段$code_field=mysqli_fetch_fields($res);foreach($code_fieldas$val){array_push($tot_column,$val->name);}}mysqli_close($con);
//$auth = new Auth(&$info['host_name'],&$info['user_id'],&$info['user_pw'],&$info['db_name']);php5// php7$host_name41=&$info['host_name'];$user_id41=&$info['user_id'];$user_pw41=&$info['user_pw'];$db_name41=&$info['db_name'];$auth=newAuth($host_name41,$user_id41,$user_pw41,$db_name41);