MYSQL
SELECT A.judul FROM tb_pengetahuan A UNION SELECT B.judul FROM tb_forum B
结果MYSQL View Image
PHP
$sql=mysql_query("SELECT judul FROM tb_pengetahuan UNION SELECT judul FROM tb_forum");
$no=1;
while ($data=mysql_fetch_array($sql)){
$judul = $data['judul'];
}
RESULT View Image
为什么结果不同?
我想要与MySql相同的结果,你能帮助我吗?