search
Homephp教程php手册php access 数据库转换到mysql数据库代码(1/2)

php教程 access 数据库教程转换到mysql教程数据库代码
//《ACCESS数库转换成MYSQL数据库教程》看不懂的朋友可加QQ:345838256/////////////////////////////////
//本人采集来的数据是ACCESS的,但我的程序是mysql的,故写了一个程序,程序三步走,分享一下...喜欢操作数据库的朋友应该都会用到的.///////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////1.连接mysql////////////////////////////////////////////////////////////

$dbhost="localhost:3307";//服务器
$db="dataname";//数据库
$dbuser="root";//用户名
$dbpass="*******";//密码
$db_qianzhui="sdb_";//表前缀
$link=mysql_connect($dbhost,$dbuser,$dbpass);
if(!$link) echo "链接失败!";
else echo "成功!!!";
mysql_query("SET NAMES 'UTF8'"); //////////////////////////
mysql_query("SET CHARACTER SET UTF8"); /////////////////////>>>解决乱
mysql_query("SET CHARACTER_SET_RESULTS=UTF8'");/////////////>>>码问题
mysql_select_db("{$db}");////////////////////////////////// 

1 2

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools