Help with MySQL queries - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Help with MySQL queries (/showthread.php?tid=65290) Help with MySQL queries by absorbation on 08-23-2006 at 05:52 PM
OK, I use MySQL databases for everything when I use PHP, I never used .txt files and it is so easy to understand and learn. However, I really am limited on the actual syntax (not the PHP functions for it). quote: 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 $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"); RE: Help with MySQL queries by absorbation on 08-24-2006 at 12:14 PM Great, thanks to both you guys, it really made some of my queries easier to write RE: Help with MySQL queries by RaceProUK on 08-24-2006 at 02:27 PM
Actually, quick question: why is fid a text field when you're storing numbers in it? RE: Help with MySQL queries by absorbation on 08-24-2006 at 03:21 PM
quote: 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 : code: RE: Help with MySQL queries by RaceProUK on 08-25-2006 at 10:11 AM
quote:In that case: Why is fid a text field when MyBB stores numbers in it? It just doesn't make sense to me. RE: Help with MySQL queries by surfichris on 08-25-2006 at 10:22 AM Nobody ever said it was a text field - stop assuming because he is using single quotes it means it is a text field. RE: Help with MySQL queries by RaceProUK on 08-25-2006 at 10:46 AM
quote:Well, sorry if I offended you by assume that using text strings means comparing strings. It's not as if I said the whole thing was shit because it looks like a text field. All I said was it doesn't make sense to me. After all, it was just a question out of interest. |