$ Dbhost & quot; localhost & quot; $ dbuser & quot; admin & quot; $ dbpass & quot; $ dbname & quot; lch & quot ;; $ connmysql_connect ($ dbhost, $ dbuser, $ dbpass, $ dbname );
$ Dbhost = "localhost ";
$ Dbuser = "admin ";
$ Dbpass = "";
$ Dbname = "lch ";
$ Conn = mysql_connect ($ dbhost, $ dbuser, $ dbpass, $ dbname );
If ($ conn)
{
Echo "connect ";
} Else
{
Echo & quot; 11111 & quot ";
}
Mysql_select_db ($ dbname, $ conn );
$ SQL = "insert ";
$ SQL. = "user (tripal_id, company_id, username, email, name, credit, parent_id, password, settle_password, lognum, last_login, new_fan_num, remember_me_num,
Is_admin, is_bb, is_bc )";
$ SQL. = "values ('1', '1', 'name3', '1 @ qq.com ', 'ling', '23', '0', null, null, '1', '2017-10-18 16:25:39 ', '1', '1', '1', '1', '1 ')";
Mysql_query ($ SQL) or die ('Insert data failed cause: '. mysql_error ());
$ Select = "select * from user ";
$ Result = mysql_query ($ select) or die ('select data failed cause: '. mysql_error ());
Print_r (mysql_fetch_array ($ result ));
$ Update = "update user set email = '2 @ QQ.com 'where id = 3 ";
Echo $ update;
Mysql_query ($ update) or die ('update data failed cause: '. mysql_error ());
$ Delete = "delete from user where id = 1 ";
Mysql_query ($ delete) or die ('delete data failed cause: '. mysql_error ());