Retreiving news from forum

Hi, I am currently trying to retreive news from my forum to put in my index.php. Here is the code I am using:
[php]

<?php $news_query = 'SELECT t.topic_id, p.poster_id, p.post_subject, p.post_text, p.post_time, u.username FROM 'phpbb3_('forum', 'table_prefix') 'topics as t, 'phpbb3_('forum', 'table_prefix'). 'posts as p, 'phpbb3_('forum', 'table_prefix'). 'users as u WHERE t.forum_id="news forum" AND t.topic_type NOT IN (2, 3) AND(t.topic_first_post_id = p.post_id) AND(u.user ?>[/php]

And here is the error I am getting:

Parse error: parse error, unexpected T_STRING in /homepages/12/d217969421/htdocs/content/index.php on line 9

What am I doing wrong? How do I check my table prefix?
Here is my site incase you guys would like to check:
http://www.clanbigrig.com

[size=99px]edit Q1712: changed [code] to [php][/size]

Couple of things…

First I am guessing this is just a copy and paste error, but at the end of this query there isn’t the end );

Next can you post a line or 2 of code above this and a line or 2 below it?

Lastly, what kind of database are you using… I going to guess MySQL, but just wanna make sure.

i changed [code] to [php].

the syntax-highliting shows that the ’ inside the string are causing the syntaxerror.

The only code above and below is [code]

<?php ... ?>[/code]

Please see his post and review your first post. As Q - stated it shows that you have single quotes causing you problems.

Sponsor our Newsletter | Privacy Policy | Terms of Service