究äºä¸ä¸è¿å¨ä¸æèåï¼å ±äº«ä¸ä¸ï¼å¸ææ人è½ç»§ç»å®åã
程序员文章站
2022-04-18 17:44:36
...
èå|ä¸æ
PHP代ç :--------------------------------------------------------------------------------
if( !( $link = mysql_connect() ) ){
fatal("Could not connect to local MySQL server.");
}
if( !mysql_select_db( "loaction", $link ) )
{
mysql_close( $link );
fatal("Could not select database ParserSample.");
}
$sql="select * from district order by locationid asc";
$query=mysql_query($sql,$link);
?>
if(!empty($_POST['City'])){
echo $_POST['City'];
}
?>
表ç»æï¼
#
# 表çç»æ `district`
#
# å建æ¶é´: 2003 å¹´ 08 æ 02 æ¥ 11:21
# æåæ´æ°æ¶é´: 2003 å¹´ 08 æ 02 æ¥ 11:21
#
CREATE TABLE `district` (
`locationid` int(10) NOT NULL default '0',
`districtid` int(10) NOT NULL auto_increment,
`areacode` varchar(4) NOT NULL default '',
`zipcode` varchar(6) NOT NULL default '',
`districtname` varchar(50) NOT NULL default '',
KEY `districtid` (`districtid`)
) TYPE=MyISAM AUTO_INCREMENT=7 ;
#
# 表`district`ä¸æ°æ®locationidââçidï¼districtidââå¸idï¼districtnameââå¸åç§°ï¼ areacode ââå¸åºå·ï¼zipcodeââå¸é®æ¿ç¼ç
#
# --------------------------------------------------------
#
# 表çç»æ `loaction`
#
# å建æ¶é´: 2003 å¹´ 08 æ 02 æ¥ 09:28
# æåæ´æ°æ¶é´: 2003 å¹´ 08 æ 02 æ¥ 10:36
#
CREATE TABLE `loaction` (
`loactionid` int(10) NOT NULL auto_increment,
`loactionname` varchar(50) NOT NULL default '',
KEY `loactionid` (`loactionid`)
) TYPE=MyISAM AUTO_INCREMENT=4 ;
#
# 表`loaction`ä¸æ°æ®ï¼loactionidââçidï¼loactionnameââçå称
#
#表