openside("Co na forum"); $dbms = 'mysql'; $adr = 'forum/'; $dbhost = 'localhost'; $dbname = 'xxx; $dbuser = 'xxx'; $dbpasswd = 'xxx'; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); mysql_connect($dbhost, $dbuser, $dbpasswd) or die('Nie moglem polaczyc sie z baza danych, sprobuj pozniej'); mysql_select_db($dbname) or die('Mam problemy z wyborem bazy danych'); $zapytanie = " SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_last_post_id, p.poster_id, p.post_time, u.username, u.user_id FROM ".$table_prefix."topics t, ".$table_prefix."posts p, ".$table_prefix."users u WHERE p.post_id = t.topic_last_post_id AND u.user_id = p.poster_id ORDER BY t.topic_id DESC LIMIT 5"; $wykonanie = mysql_query($zapytanie); echo '
' . $row['topic_title'] . ' |