![]() |
Questions
Does anyone know how to do this:
www.diyaudio.com I want to show the last 20 posts like they have. They gave me this SQL syntex: ----------------------------------------------------- SELECT t.threadid, t.title, t.lastposter, t.replycount, t.views, t.forumid, f.title, t.lastpost FROM thread AS t, forum AS f WHERE t.forumid = f.forumid ORDER BY t.lastpost DESC LIMIT 30 ----------------------------------------------------- How can i implement this into my php page? So i can show the information? Thanks in advance |
does anyone know?
|
Crude but shows you how:
PHP Code:
|
How do i add it so it shows it in this template which is for the index.php (http://www.myfootballforum.com)
Code:
<html> |
will someone be able to help me out (give me instructions) as i want this on my forum a.s.a.p.
Thanks |
ok create a new .php file and call it stats.php (use the code posted by filburt) then add this line.
Code:
<div align="center"> Code:
$buddylist |
That stats.php does not work. I get this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/myfootba/public_html/discussion/stats.php on line 19 try it yourself: http://www.myfootballforum.com/discussion/stats.php BELOW IS THE CODE INSDE stats.php: ========================== <?php echo "<pre>"; $result = mysql_query("SELECT t.threadid, t.title, t.lastposter, t.replycount, t.views, t.forumid, f.title, t.lastpost FROM thread AS t, forum AS f WHERE t.forumid = f.forumid ORDER BY t.lastpost DESC LIMIT 30"); while ($bits = mysql_fetch_array($result)) { print_r($bits); } ?> =============================== |
All times are GMT. The time now is 06:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|