I must read a MySql Table with type, vers and variant (imported from EXCEL). With three strings (eg: abc
, 6zg
, qsdf
) i must scan thru the table and find out if there is an table entry where col1 = 'abc' AND col2 = '6zg' AND col3 = 'qsdf'
. The result must be "yes there is such an entry" or "no" (boolean). How does the SELECT
look like?
My code does not work at all!
$result = mysqli_query($db, "SELECT * FROM $table_name
WHERE Type LIKE '%$typ%'
AND Version LIKE '%$version%'
AND Variant LIKE '%$variant%'");