Hey there
i have a problem with my roster....
in the made by section
if i select tailoring or maybe leatherworking I have a lot of dupes in the list!
can any1 help with a how to fix this plz?
every help is appreciated......and thnx
Moderator: ds
function recipe_get_all_alt( $skill_name, $search, $sort )
{
global $wowdb;
if (isset($server))
{
$server = $wowdb->escape( $server );
}
$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
//$query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')");
switch ($sort)
{
case 'item':
$query .= " ORDER BY `difficulty` DESC , recipe_type ASC , recipe_name ASC";
break;
case 'name':
$query .= " ORDER BY recipe_name ASC , recipe_type ASC , `level` DESC , `difficulty` DESC";
break;
case 'type':
$query .= " ORDER BY recipe_type ASC , `level` DESC , recipe_name ASC , `difficulty` DESC";
break;
case 'reagents':
$query .= " ORDER BY `reagents` ASC , recipe_name ASC , recipe_type ASC , `difficulty` DESC";
break;
case 'level':
$query .= " ORDER BY `level` DESC , recipe_name ASC , recipe_type ASC , `difficulty` DESC";
break;
default:
$query .= " ORDER BY `difficulty` DESC , recipe_type ASC , recipe_name ASC";
break;
}
$result = $wowdb->query( $query );
// echo '--'.$query.'--';
$recipes = array();
while( $data = $wowdb->fetch_assoc( $result ) ) {
$recipe = new recipe( $data );
$recipes[] = $recipe;
}
return $recipes;
}
$recipes = recipe_get_all( $_REQUEST["proffilter"],($_REQUEST["filterbox"]?$_REQUEST["filterbox"]:''), ($_REQUEST["sort"]?$_REQUEST["sort"]:'type') );
$recipes = recipe_get_all_alt( $_REQUEST["proffilter"],($_REQUEST["filterbox"]?$_REQUEST["filterbox"]:''), ($_REQUEST["sort"]?$_REQUEST["sort"]:'type') );
$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, item_color, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
//$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, recipe_texture, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
//$query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')");
$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, item_color, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
$query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')")." GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
Users browsing this forum: No registered users and 0 guests