Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL] operator porównania !=
lukko
post
Post #1





Grupa: Zarejestrowani
Postów: 49
Pomógł: 0
Dołączył: 12.03.2009

Ostrzeżenie: (10%)
X----


Witam,

W Zapytaniu chce uzyskać efekt by w sklepie internetowym nie pojawiały się produkty bez zdjęć, czyli te które w komórce tabeli mają wartość: _no_.gif

Więc robiłem z:
Kod
p.products_image != '_no_.gif'
p.products_image <> '_no_.gif'


I nadal wyświetla mi produkty z _no_.gif

A oto całe zapytanie:

Kod
$products_new_query_raw = "select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, p.manufacturers_id, m.manufacturers_name, p.products_quantity from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where (TO_DAYS(now()) - TO_DAYS(p.products_date_added) < 14) AND p.products_status2 = '1' and p.products_status = '1' and p.products_weight > '0.000' and p.products_image != '_no_.gif' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' ";


Co ja mogę robić nie tak? Z wartościami liczbowymi jest dużo prościej... a tego coś ogarnąć nie mogę
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 15:41