突然在添加表时sql查询不起作用。
虽然它在其他表中有效。 代码有没有错误?
$sql="select index,name from add Limit 0,10";
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result))
{
echo $row['name'];
}
索引名称填充随机数据。
最佳答案
add
是一个 reserved word在 MySQL 中。
你必须引用它。
关于php - 简单的 mysql 查询在 php 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16543321/