КОроче итог :
$sql = "SELECT post.title, post.url, menu2.title_menupoint, menu2.url_menupoint " .
" FROM `posts` as post " .
" LEFT JOIN `menupoint` AS menu " .
" ON post.`url`= menu.`url_menupoint` " .
" LEFT JOIN `menupoint` AS menu2 ON menu2.`id_menupoint`= menu.`par` " .
" WHERE post.id_menupoint!=311 " .
" ORDER BY post.date_add DESC " .
" LIMIT 8" ;
|