SQL statement is:
SELECT *
FROM cigardata
WHERE Brand LIKE '$brandS'
AND Style LIKE '$styleS'
AND Wrapper LIKE '$wrapperS'
AND UPC LIKE '$upcS';
User inputs Brand and Wrapper only and it will return nothing, normal since nothing in the other 2 fields. If I fill all 4 fields of course it works perfect. What can be used in the other 2 fields as a wild card to satisfy that all 4 fields are filled and return a result? I have tried %.%, %''%, %*%. Any suggestions......
AND field like "$field"for non defined ones?