mysql

$con = mysql_connect("IPaddress","name","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
return 0;
}
else
{
return $con;
}

//select database

mysql_select_db("databasename", $con);

$result = mysql_query("SELECT A   FROM biaoming  where ziduanming = '".bianliang."' ",$con);
while($row = mysql_fetch_array($result))
{

...............................

..........................
mysql_close($con);
}

mysql_query("set names 'GBK'");

 

mysql_query("INSERT INTO biaoming ( duan1,duan2,duan3...... ) VALUES('".bianliang1."','".bianliang2."','".3."'........)"))

 

 

 

posted @ 2013-12-04 11:45  呱呱老师  阅读(186)  评论(0编辑  收藏  举报