///Access library convert to MySQL database tutorial The friend who does not understand can add qq:345838256/////////////////////////////////
//I collect data is access, But my program is MySQL, so write a program, the program three steps to share ... Friends who like to manipulate the database should be used.///////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////1. Connection mysql/////////////////////////////// /////////////////////////////
The code is as follows |
Copy Code |
$dbhost = "localhost:3307";//server $db = "Dataname";//Database $dbuser = "root";//user name $dbpass = "*******";//Password $db _qianzhui= "sdb_";//Table Prefix $link =mysql_connect ($dbhost, $dbuser, $dbpass); if (! $link) echo "link failed!"; else echo "Success!!!"; mysql_query ("SET NAMES ' UTF8 '"); ////////////////////////// mysql_query ("Set CHARACTER set UTF8"); >>> Solve Chaos mysql_query ("SET Character_set_results=utf8 '");/////////////>>> code problem mysql_select_db ("{$db}");////////////////////////////////// |