Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将多个 SELECTS 中的元素检索到 PHP 中?
以这个为例:
$query= mysql_query("SELECT ...; SELECT ...;")
如果可能,我们如何组织信息?
我不认为这很简单:
while($row = mysql_fetch_array($query))
您应该Union按照@JLibert 的建议使用。
Union
请参阅文档:http ://dev.mysql.com/doc/refman/5.1/en/union.html
$query = mysql_query("SELECT [blank] FROM [blank] UNION SELECT [blank] FROM [blank]");
(以前的人建议的,只是它的样子)