Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z zapytaniem, jak dodac warunek
Karlik_t
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 30.06.2005

Ostrzeżenie: (0%)
-----


mam takie zapytanie:
  1. $query = "SELECT member_details.f_name, member_details.login, member_details.mem_id, member_details.email_id , count(member_referrals.mem_id) as 'dupa'
  2. FROM `member_referrals`, member_details where member_details.mem_id=member_referrals.parent_id and member_details.login<>'WPISZ_POLECONYCH' group by member_referrals.parent_id order by 'dupa' DESC LIMIT 0, 30";

zlicza to i działa ogólnie dobrze
chciałbym jednak, żeby zliczało tylko kiedy konto member_referrals.mem_id miało w member_details.joined_date >= jakas data
czy ktos moze mi pomoc worriedsmiley.gif
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
SongoQ
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 923
Pomógł: 9
Dołączył: 25.10.2004
Skąd: Rzeszów - studia / Warszawa - praca

Ostrzeżenie: (0%)
-----


http://dev.mysql.com/doc/refman/4.1/en/dat...-functions.html


--------------------
Go to the top of the page
+Quote Post
Karlik_t
post
Post #3





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 30.06.2005

Ostrzeżenie: (0%)
-----


Sorry, ale mam problem z przetłumaczeniem sobie całości sad.gif Mógłby mi ktoś podać poprzednie zapytanie już przerobione? Z góry dzięki
Go to the top of the page
+Quote Post
Adiasz
post
Post #4





Grupa: Zarejestrowani
Postów: 155
Pomógł: 0
Dołączył: 28.02.2004

Ostrzeżenie: (0%)
-----


http://portalwiedzy.onet.pl/tlumacz.html
Go to the top of the page
+Quote Post
Karlik_t
post
Post #5





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 30.06.2005

Ostrzeżenie: (0%)
-----


Z tego co wyczytałem to jest używane z selectem i pobiera datę, a mi chodzi o to, żeby sprawdzało zawartość komórki i porównywało z daną zmienną. worriedsmiley.gif
Go to the top of the page
+Quote Post
SongoQ
post
Post #6





Grupa: Przyjaciele php.pl
Postów: 2 923
Pomógł: 9
Dołączył: 25.10.2004
Skąd: Rzeszów - studia / Warszawa - praca

Ostrzeżenie: (0%)
-----


He he, wystarczy odwrocic.

Ok kolejna podpowiedz, mozesz to zastosowac i przeniesc do WHERE http://forum.php.pl/index.php?showtopic=32255&hl=


--------------------
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 06:59