![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 415 Pomógł: 0 Dołączył: 24.12.2008 Ostrzeżenie: (10%) ![]() ![]() |
Mam coś takiego:
Czy dobrze rozumiem porównywanie dat? Czy to tak się robi? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 36 559 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
http://dev.mysql.com/doc/refman/5.5/en/dat...-functions.html
PIerwszy przykład na tej stronie, która notabene jest manualem, odpowiada na Twoje pytanie. Cytat Here is an example that uses date functions. The following query selects all rows with a date_col value from within the last 30 days:
mysql> SELECT something FROM tbl_name -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col; |
|
|
![]() ![]() |
![]() |
Aktualny czas: 6.10.2025 - 20:59 |