I am trying to compare a PHP String (123) with a portion of MySQL String (Suppose: BB123).
mysql_query("SELECT * FROM `table` WHERE `site_id` LIKE '".$row["bs_id_site"]."'");
I have used this above query.
But it is not returning the result because of Alpha String (Like: "BB") inside site_id
.
What can be a solution in such case, while comparing PHP String with a part of MySQL String?
If I would compare a Part of PHP String I could use % sign, but what will be the case for MySQL String?