Hi guys,
I’m trying to get data from my database by filtering what is specified. I want to have basically two conditions for my query.
1. Select the type.
2. Type in the value you’re looking for.
Example currently I have this:
[code=php]mysql_query(“SELECT * FROM $db_tbl_assets WHERE pc_type=’$fClass’ AND pc_tag_num=’$fValue'”);
But I want to have something like this:
[code=php]mysql_query(“SELECT * FROM $db_tbl_assets WHERE pc_type=’$fClass’ AND pc_tag_num LIKE ‘$fValue%'”);
But it’s not working for some reason (where I have the multiple conditions). Like I want to be able to select all records that, let’s say, have “LTC” in the pc_type column and THEN filter through those by using the pc_tag_num LIKE ‘$fValue%’… understand?
Thanks!!