flee Posted August 20, 2007 Report Share Posted August 20, 2007 Guten Tag allemal, Dieser where-teil findet keine resultate: if ((!empty ($_GET['keywords']) && xtc_not_null($_GET['keywords'])) && (!empty ($_GET['keywords2']) && xtc_not_null($_GET['keywords2']))) { $where_str .="((pov.products_options_values_name LIKE '%".$keywords."%' AND pov.products_options_values_id = 2 )"; $where_str .="AND (pov.products_options_values_name LIKE '%".$keywords2."%' AND pov.products_options_values_id = 1 ))"; } Aber wenn ich das AND in OR veränder geht es wohl. if ((!empty ($_GET['keywords']) && xtc_not_null($_GET['keywords'])) && (!empty ($_GET['keywords2']) && xtc_not_null($_GET['keywords2']))) { $where_str .="((pov.products_options_values_name LIKE '%".$keywords."%' AND pov.products_options_values_id = 2 )"; $where_str .="OR (pov.products_options_values_name LIKE '%".$keywords2."%' AND pov.products_options_values_id = 1 ))"; } Nur zeigt er dann alles an wo $keywords und/oder $keywords2 drin sind. OR in AND verändern hilft nicht,dann findet er nichts,während wohl die werte in der mysql-tabelle bestehen. Ich will aber das er nur anzeigt wo $keywords UND $keywords2 drin sind. Weiss hier jemand was ich übersehe?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.