$link = mysql_connect('localhost', '數(shù)據(jù)庫(kù)用戶', '數(shù)據(jù)庫(kù)密碼'慶橘);

創(chuàng)新互聯(lián)主打移動(dòng)網(wǎng)站、成都網(wǎng)站制作、網(wǎng)站建設(shè)、網(wǎng)站改版、網(wǎng)絡(luò)推廣、網(wǎng)站維護(hù)、申請(qǐng)域名、等互聯(lián)網(wǎng)信息服務(wù),為各行業(yè)提供服務(wù)。在技術(shù)實(shí)力的保障下,我們?yōu)榭蛻舫兄Z穩(wěn)定,放心的服務(wù),根據(jù)網(wǎng)站的內(nèi)容與功能再?zèng)Q定采用什么樣的設(shè)計(jì)。最后,要實(shí)現(xiàn)符合網(wǎng)站需求的內(nèi)容、功能與設(shè)計(jì),我們還會(huì)規(guī)劃穩(wěn)定安全的技術(shù)方案做保障。
$db_list = mysql_list_dbs($link);
while ($row = mysql_fetch_object($db_list)) {
$dbname = $row-Database;//得到數(shù)據(jù)庫(kù)名
break;
}
$result = mysql_list_tables($dbname);
while ($row = mysql_fetch_row($result)) {
$Table=$row[0];break;//得到表名
}
mysql_free_result($result);
$db=mysql_select_db($dbname,$link); //選擇目標(biāo)數(shù)據(jù)庫(kù)槐差念名
$query=mysql_query("select * from {$Table} limit 0,1"); //鉛困查詢1條記錄
$r=mysql_fetch_array($query); //將查詢結(jié)果的值賦給$r
print_r($r); //一條數(shù)據(jù)
網(wǎng)站欄目:php數(shù)據(jù)庫(kù)讀出來的數(shù)據(jù) php查詢數(shù)據(jù)庫(kù)數(shù)據(jù)
鏈接地址:http://chinadenli.net/article15/dspjcdi.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供ChatGPT、域名注冊(cè)、網(wǎng)站策劃、外貿(mào)建站、虛擬主機(jī)、關(guān)鍵詞優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)