Jump to content
xt:Commerce Community Forum

advanced_search_results anpassung


flee

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...