<?php $result = mysql_query("SELECT * FROM phome_ecms_xiangmu where xiangmujingli='$tmgetusername' union select from phome_ecms_kanchaxiangmu where xiangmujingli='$tmgetusername' "); while($row = mysql_fetch_array($result)) { echo "<a href=" . $row['titleurl'] . " target=blank>"; echo $row['xiangmumingcheng'] ; echo "</a>/"; } ?>
这个代码错误在哪儿?如何使用union查询两个表的数据并反馈,谢谢!
|