Thread: PHPBB Question
View Single Post
  #16 (permalink)  
Old 03-17-2008, 03:31 PM
mikesmith76 mikesmith76 is offline
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 257
mikesmith76 RepRank 0
Default Re: PHPBB Question

Hi again

Before I start do you really need to do this in ASP? It's just how have you got phpbb running if you need to use ASP?

Had to ask.

Anyway on to the ASP. This will be really rough as like I said previously i've not touched ASP in a long time, plus I don't know anything about your server setup.

Assuming you're using ODBC to connect to your database the following code may be useful

Code:
sql = "SELECT * FROM phpbb_posts INNER JOIN phpbb_users ON phpbb_users.user_id = phpbb_posts.poster_id INNER JOIN phpbb_topics ON phpbb_topics.topic_id = phpbb_posts.topic_id ORDER BY post_time DESC LIMIT 0 , 3 "

set conn=Server.CreateObject("ADODB.Connection") 
conn.Open "northwind"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql, conn

While Not rs.EOF
    Response.Write( rs("title") );

    rs.MoveNext
Loop
Hopefully this will get you started. If you can provide some more information about your server set up I may be able to guide you further.

Hope this helps
Reply With Quote