[!--quoteo(post=372149:date=May 7 2006, 07:14 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 7 2006, 07:14 PM) [snapback]372149[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code]$smilies = mysql_query("SELECT * FROM smilies WHERE list='1' ORDER BY ...... ");[/code] Now all you need is a proper query ... WHERE list='1' ORDER BY is incomplete and non-functional. [/quote] Hm...a part didnt' show in my code. I'm using order by code, but it's still not working. [code]<?php //generate smilies table $smilies = query("SELECT * FROM smilies WHERE list='1' ORDER BY code"); $n=0; while($smile = mysql_fetch_assoc($smilies)) if($n % 5 == 0 && $n != 0) { $smilelist .=<<<END </tr> die(mysql_error()); <tr> END; } $smilelist .=<<<END <td> <center> <img src=/images/smilies/$smile[img]> <br>$smile[code] </center> </td> END; $n++; //while //make an array of all the mcode tags //put "x" in the val spot to create auto example $mcode = array( "[b]Text[/b]" => "x", "[i]Text[/i]" => "x", "[u]Text[/u]" => "x", "[font=times new roman]Text[/font]" => "x", "[color=red]Text[/color]" => "x", "[size=15]Text[/size]" => "x", "[center]Text[/center]" => "x", "[align=right]Text[/align]" => "x", "[quote]Quote Text[/quote]" => "x", "[img]Image Url[/img]" => "x", "[url]http://subeta.org[/url]" => "x", "[url=http://subeta.org]Subeta Pets[/url]" => "x", "[user=highrise]" => "x", "[item=Ultra Star Rod]" => "x", "[item2=Ultra Star Rod]" => "x", "[set=name]value[/set]" => "Sets variable 'name' equal to 'value'", "[var=name]" => "Returns the value of variable 'name'", "[random=Text1--Text2--Text3--Text4--Text5]" => "x", "[heart]" => "x", "[br]" => "New Line", "[p]" => "New Paragraph", ); //generate mcode table foreach($mcode AS $code=>$func) { if($func == "x") { $output = subetaFilter($code); } else { $output = $func; } $mcodelist .=<<<END <tr> <td> $code </td> <td> $output </td> </tr> END; } $body =<<<END <center> <table width=95% class=sp-cells> <tr> <td colspan=5 class=sp-sub> <center><b>Smilies (List Currently Unavailable)</b></center> </td> </tr> <tr> $smilelist </tr> </table> </center> <p> <center> <table width=95% class=sp-cells> <tr> <td colspan=2 class=sp-sub> <center><b>mCode</b></center> </td> </tr> <tr class=sp-sub> <td> <center><b>Code</b></center> </td> <td> <center><b>Output</b></center> </td> </tr> $mcodelist </table> </center> END; blankForum("Smilies/mCode List","$body","forums.php"); ?>[/code]