View Single Post
Old 06-19-2008, 08:29 PM   #5 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

just a tip, if you have a need for a conditional with that many different options depending on a single variable a switch is better suited:

PHP Code:
<?php
switch($num)
{
  case 
1:
    
$viewrec mysql_query("select * from tbl_clone where grp = '1' order by priority");
    break;
  case 
2:
    
$viewrec mysql_query("select * from tbl_clone where grp = '2' order by priority");
    break;
   ...

  default:
    die(
'Page not set');
}
PHP: switch - Manual
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote