<?php
//33.41
$mysql_server_name="localhost";
$mysql_userName = "root";
$mysql_password = "";
$mysql_database = "yourDB_Name";
$sql = "insert ..."; //(增删改)
$conn = mysql_connect("locathost","root","");
mysql_select_db("william_DB",$conn);
mysql_query($sql); //$result = mysql_query($sql);
$id = mysql_insert_id($sql);
mysql_close();
//==============
$sql = "select..."; //(查询语句)
$conn = mysql_connect("locathost","root","");
$result = mysql_db_query($mysql_database,$sql,$conn);
while($row=mysql_fetch_row($result))
{
print_r($row);
}
mysql_free_result($result);
?>
=========================
另外:
nl2br(string ) 允许手动自动换行。
DATE_FORMAT(now,'%Y年 %M月 %D日 %T ')
for($i=0; $i<strlen($theCount[0]); $i++)
{//图形计数器
$digi = substr($theCount[0],$i,1);
$showNum .= "<img src='num/$digi.gif'>";
}