I have a search form where every text field correspond to a column name in a database table. I want to find all the items in the table that may have any value = to one typed by the user in the search form. I have tried with syntax above
mysql_query(''SELECT* FROM table name WHERE fieldname LIKE formValue
AND nfieldname LIKE nformValue...; )'');
mysql_query('' 'SELECT* FROM table name WHERE fieldname LIKE formValue
OR nfieldname LIKE nformValue...; )'')
sometime it works, and sometimes i get undesired results (that’s are not conserned).
I want also to eliminate a a value that was left empty by the user.
'mysql_query(''SELECT* FROM table name WHERE fieldname LIKE formValue
AND nfieldname LIKE ' ''.(array_key_exist($_POST,'nformValue')).'' ';'');
but it do not work. can any body help me with that?