You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'shipping ='free' at line 1
Вот код:
$query_string = array();[code]
if ( trim( $_GET['free-sheeping'] ) != '' ){ $query_string[] = " shipping ='".$_GET['free-sheeping'].""; }
//собираю строку запроса в базу
if ( !empty( $query_string ) ){
$query_string = implode( ' AND ', $query_string );
$zapros_na_sort = "SELECT * FROM inf_product WHERE location = '".$strana."' ".$query_string." ";
}
else
{
echo 'Пустые переменные';
$zapros_na_sort = "SELECT * FROM inf_product WHERE location = '".$strana."' ";
}
$viborka_tovar_cater = mysql_query($zapros_na_sort) or die(mysql_error());