¿©·¯ Å×À̺íÀÇ ÃÖ±Ù °Ô½Ã¹° ÃßÃâ (union all »ç¿ë) |
|
|
![](icon/private_name/1.gif) |
12³â Àü |
qa ¶ó´Â Å×À̺í°ú news ¶ó´Â Å×À̺íÀÇ ÃÖ±Ù ³¯Â¥º° ÃßÃâÇÏ´Â Äõ¸®¹®ÀÔ´Ï´Ù.
reg_date Çʵ忡´Â ³¯Â¥°¡ ±â·ÏµÇ¾îÀÖ½À´Ï´Ù.
$query = "select 'qa' as bbs, code, title, reg_date from qa union all select 'news' as bbs,code, title, reg_date fromnews order byreg_date desc limit 30";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
echo $row[bbs]." , ".$row[code]." , ".$row[title]." , ".$row[reg_date]."
";
} |
|
̵̧ : 560 |
̵̧
¸ñ·Ï
|
|