【发布时间】:2011-09-20 04:23:03
【问题描述】:
这是我正在使用的:
$query = "SELECT Products.Title, Product_Lines.pl_Title, Manufacturers.man_Title".
"FROM Products, Product_Lines, Manufacturers ".
"WHERE Products.pl_ID = Product_Lines.pl_ID AND Product_Lines.man_ID = Manufacturers.man_ID";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['Title']. " - ". $row['pl_Title']. " - ". $row['man_Title'];
echo "<br />";
}
我收到此错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near 'WHERE Products.pl_ID = Product_Lines.pl_ID AND
Product_Lines.man_ID = Manufactur' at line 1
我不熟悉这个方法和这个错误
【问题讨论】:
-
您要加入这些表吗?如果是,哪些是外键?
-
能否给我们您的数据库结构?
标签: php mysql mysql-management