![]() ![]() |
Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 57 Pomógł: 1 Dołączył: 20.03.2008 Ostrzeżenie: (0%)
|
Hi, mam takie zapytanie
I potrzebuje dodać coś na styl WHERE ilosc > 3 - w jaki sposób to wykonać? Ten post edytował seba123 23.03.2011, 11:35:28 |
|
|
|
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 1 374 Pomógł: 149 Dołączył: 1.03.2006 Ostrzeżenie: (0%)
|
To nie WHERE tylko HAVING dodatkowa klauzula (IMG:style_emoticons/default/smile.gif)
|
|
|
|
Post
#3
|
|
|
Grupa: Zarejestrowani Postów: 57 Pomógł: 1 Dołączył: 20.03.2008 Ostrzeżenie: (0%)
|
Oooo! Dziękuję, zupełnie zapomniałem o tym! (IMG:style_emoticons/default/wink.gif)
|
|
|
|
Post
#4
|
|
|
Grupa: Zarejestrowani Postów: 7 Pomógł: 0 Dołączył: 18.09.2010 Ostrzeżenie: (20%)
|
SELECT post.ID, post.post_title, post.post_date, AVG(rating.rating_rating) AS ocena, COUNT(rating.rating_rating) AS ilosc FROM wp_posts AS post LEFT JOIN wp_ratings AS rating ON(rating.rating_postid = ID) WHERE (post.post_type = 'post' && post.post_status = 'publish')and (ilosc > 3 ) GROUP BY post.ID ORDER BY ocena DESC LIMIT 4 |
|
|
|
![]() ![]() |
|
Aktualny czas: 19.12.2025 - 14:22 |