What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help with MySQL queries

Help with MySQL queries
Author: Message:
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
O.P. RE: Help with MySQL queries
quote:
Originally posted by RaceProUK
Actually, quick question: why is fid a text field when you're storing numbers in it?

I'm not, it's in MyBB post's table, I'm taking the id from it to show the latest posts on my forums. Some forums are hidden so I'm using all those numbers to display the forum ids I want. I then process the data like this :P:

code:
$result = mysql_query("select *from posts where fid in ('2','8','4','5','6','9','22','24','14','23','11','12','13') order by dateline desc limit 5");
while($r = mysql_fetch_array($result))
{
    $pid = $r['pid'];
    $tid = $r['tid'];
    $subject = $r['subject'];
   
    echo "<a href=\"http://forum.msgstuff.com/showthread.php?tid=$tid&pid=$pid\" target=\"_blank\">$subject</a>\n";
}
08-24-2006 03:21 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with MySQL queries - by absorbation on 08-23-2006 at 05:52 PM
RE: Help with MySQL queries - by Ezra on 08-23-2006 at 06:07 PM
RE: Help with MySQL queries - by RaceProUK on 08-24-2006 at 12:12 PM
RE: Help with MySQL queries - by absorbation on 08-24-2006 at 12:14 PM
RE: Help with MySQL queries - by RaceProUK on 08-24-2006 at 02:27 PM
RE: Help with MySQL queries - by absorbation on 08-24-2006 at 03:21 PM
RE: Help with MySQL queries - by RaceProUK on 08-25-2006 at 10:11 AM
RE: Help with MySQL queries - by surfichris on 08-25-2006 at 10:22 AM
RE: Help with MySQL queries - by RaceProUK on 08-25-2006 at 10:46 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On