Kaylen Bartoshewski
New member
I have the following code to query mySQL table working.
$query_LOOT = sprintf("SELECT * FROM `wotlk-normal-loot`
WHERE `Type` $Type AND `Spec` $Spec
ORDER BY `Spec` ASC", GetSQLValueString($colname_LOOT, "text"));
However,
I would like to have it so $Spec can be either either be a direct string match (e.g. "=heal"), or can be passed as an empty wildcard (e.g. " * ") to search all the different strings that column of my table.
Is there any way to do this?
IF/ELSE statements are NOT a solution I want.
Thanks in advance.
Thank you very much, I am still not achieving my goals however.
I am trying to be able to pass either a value to $Spec such as "Plate" or pass a wildcard to all the things in my Spec Column show up (e.g. Plate, Mail, Leather, Cloth)
is there anything I can do?
$query_LOOT = sprintf("SELECT * FROM `wotlk-normal-loot`
WHERE `Type` $Type AND `Spec` $Spec
ORDER BY `Spec` ASC", GetSQLValueString($colname_LOOT, "text"));
However,
I would like to have it so $Spec can be either either be a direct string match (e.g. "=heal"), or can be passed as an empty wildcard (e.g. " * ") to search all the different strings that column of my table.
Is there any way to do this?
IF/ELSE statements are NOT a solution I want.
Thanks in advance.
Thank you very much, I am still not achieving my goals however.
I am trying to be able to pass either a value to $Spec such as "Plate" or pass a wildcard to all the things in my Spec Column show up (e.g. Plate, Mail, Leather, Cloth)
is there anything I can do?