Create data table code in php_PHP tutorial

WBOY
Release: 2016-07-13 17:04:13
Original
962 people have browsed it

Create data table code in php tutorial

$link=mysql tutorial_connect("localhost","root","3435945")or die("***".mysql_error());
echo "Successfully connected to the server";
if(mysql_select_db(base2,$link)) echo "Select to base2 database tutorial";


$sql="create table t1(id int(5) not null primary key,name varchar(12) not null)";
if(mysql_query($sql,$link))
echo "Table T1 created successfully";
echo "

";

echo "The tables on the current base2 database are:";
echo "

";
$table_list=mysql_query("show tables",$link);
while($row=mysql_fetch_row($table_list)){
echo $row[0];
echo "

";

}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630870.htmlTechArticleCreate data table code in php tutorial $link=mysql tutorial_connect(localhost,root,3435945)or die (***.mysql_error()); echo successfully connected to the server; if(mysql_select_db(base2,$link)) ec...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template