我的mysql查詢結果的例子都在這裏;Mysql查詢結果
id = 45
species = Felis
generic = Leo
labidenlabel = S131
accessnumber = 4545
specimen = Blood
storedas = DNA
storedat = aDNA
storin = Beko Refrigerator
我想看到他們喜歡;
id = 45
species Name = Felis
generic Name = Leo
labiden Label = S131
Access number = 4545
specimen = Blood
stored As = DNA
stored At = aDNA
store In = Beko Refrigerator
等
而且有我的PHP代碼,我想改變結果區域。不是mysql字段,需要查看具體名稱。
索裏對我的英語不好......
<?php
error_reporting(1);
$speci1=$_GET['id'];
$baglan=mysql_connect("localhost","root","");
if(!$baglan){
die('Bağlantı Hatası:' . mysql_error());
}
$sec=mysql_select_db("test",$baglan);
$sql= "SELECT * from bilgiler where id='$speci1'";
$sorgu=mysql_query($sql,$baglan);
if(mysql_num_rows($sorgu) > 0){
$satir=mysql_fetch_assoc($sorgu);
foreach ($satir as $key => &$value) {
echo $key . ' = ' . $value . '<br />';
}
}else{
echo "Kayıt Bulunamadı!";
}
?>
我怎樣才能改變結果頁面? 謝謝。
您不應該使用mysql方法,因爲它們已折舊。請考慮使用mysqli或PDO作爲替代方案。 – jezzipin