我想合并下面的代码。虽然我不确定如何引用SELECT * FROM以列表结尾的任何表。“任何”变量的代码?
$this->displaylistings=mysql_query("SELECT * FROM nordstromlisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM saksfifthavenuelisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM guesslisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM gnclisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM urbanoutfitterslisting WHERE ShopperID = '$tnis->ShopperID'
UNION ALL SELECT * FROM bananarepubliclisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM americaneaglelisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM neimanmarcuslisting WHERE ShopperID = '$this->ShopperID'
UNION ALL SELECT * FROM footlockerlisting WHERE ShopperID = '$this->ShopperID'");
在此先感谢:d
+1从我这里。你应该更好地规范你的表格。 – Timotei 2009-06-20 05:29:17