Pour ce qui en est de l'erreur actuelle ?
- Code: Tout sélectionner
define('IN_PHPBB', true);
$phpbb_root_path = './phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$forum_id = 35;
$where = ($forum_id) ? " WHERE t.forum_id=$forum_id" : '';
$sql = 'SELECT t.forum_id,t.topic_id, t.topic_time, t.topic_title, t.topic_replies, t.topic_poster, t.topic_first_poster_name, t.topic_first_poster_colour, p.post_text, p.bbcode_bitfield, p.bbcode_uid, u.user_avatar
FROM ((' . TOPICS_TABLE . ' t JOIN ' . POSTS_TABLE . ' p ON p.post_id=t.topic_first_post_id) JOIN ' . USERS_TABLE . ' u ON p.poster_id=u.user_id ' .
$where .
' GROUP BY t.topic_id ';
' ORDER BY topic_time DESC ' .
' LIMIT 0 , 10 ';
Erreur générale
SQL ERROR [ mysql4 ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE t.forum_id=35 GROUP BY t.topic_id' at line 3 [1064]
SQL
SELECT t.forum_id,t.topic_id, t.topic_time, t.topic_title, t.topic_replies, t.topic_poster, t.topic_first_poster_name, t.topic_first_poster_colour, p.post_text, p.bbcode_bitfield, p.bbcode_uid, u.user_avatar FROM ((phpbb_topics t JOIN phpbb_posts p ON p.post_id=t.topic_first_post_id) JOIN phpbb_users u ON p.poster_id=u.user_id WHERE t.forum_id=35 GROUP BY t.topic_id
BACKTRACE
FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()
FILE: homez.59/wakfufra/www/news.php
LINE: 22
CALL: dbal_mysql->sql_query()




