Quote:
Originally Posted by ninjagranny
$sql['SELECT'] = '*';
$sql['FROM'] = 'character as c';
$sql['WHERE'] = "c.char_level >= {$data['minimum_level']}
AND c.char_level <= {$data['maximum_level']}
AND c.profile_id = ".$pMain->getProfileID();
$sql['SORT'] = 'c.char_name';
$result_chars = $db_raid->set_query('select', $sql, __FILE__, __LINE__);
|
If you need to check only one attribute, then you could do something like this:
Code:
SELECT
*
FROM
phpraider_character c,
phpraider_attribute_data ad,
phpraider_attribute a
WHERE
c.character_id=ad.character_id AND
ad.attribute_id=a.attribute_id AND
a.att_name='Radiance' AND
ad.att_value>=10 AND
c.char_level >= 50 AND
c.char_level <= 80 AND
c.profile_id = 1
ORDER BY
c.char_name;
That will give you all characters between 50 and 80 for the currently logged in user that also has a 'Radiance'>=10.