我對PHP和MySQL相當新,並試圖編寫一個代碼,其中我顯示列value
列attribute_id = 64
列的所有值。這是我寫的,但我似乎無法得到它的顯示:從PHP中的數據庫顯示值字段
<?
mysql_connect ("localhost","cpsdev_mage1","**********");
mysql_select_db ("cpsdev_mage1");
$sql = "select 'value' from mage_catalogsearch_fulltext
WHERE 'Attribute_id' = 64";
$result = mysql_query ($sql) or die($myQuery."<br/><br/>".mysql_error());
while($row = mysql_fetch_array($result))
{
echo $row['value'];
}
?>
刪除查詢中的'''''''周圍'value'和'Attribute_id'。 – air4x
Attribute_id或attribute_id ??並刪除'...' –
嘗試在<?php而不是<?編寫代碼。 ,var_dump($結果)如果沒有錯誤反映 – swapnesh