Home  >  Article  >  Backend Development  >  Convert php access database to mysql database code (1/2)_PHP tutorial

Convert php access database to mysql database code (1/2)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:04:17903browse

php tutorial access database tutorial to convert to mysql tutorial database code
//"Tutorial on converting ACCESS database into MYSQL database" If you don't understand it, please add QQ:345838256///////////////////////////// /////
//The data I collected is from ACCESS, but my program is from mysql, so I wrote a program with three steps. I want to share it...Friends who like to operate databases should all use it.//// ///
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// //////////////
/////////////////////////////////////1. Connect to mysql//////////// //////////////////////////////////////////////////

$dbhost="localhost:3307";//Server
$db="dataname";//Database
$dbuser="root";//Username
$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 the chaos
mysql_query("SET CHARACTER_SET_RESULTS=UTF8'");//////////////>>>Code problem
mysql_select_db("{$db}");///////////////////////////////////

1 2

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630857.htmlTechArticlephp tutorial access database tutorial conversion to mysql tutorial database code // "ACCESS database conversion into MYSQL database tutorial" see Friends who don’t understand can add QQ:345838256///////////////////////////...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn