goma smile Posted August 5, 2010 Report Share Posted August 5, 2010 Šitā vajadzētu būt normāli: "SELECT id,date FROM `kkas` WHERE date>DATE_SUB(NOW(), INTERVAL 1 DAY)" Pa vēlu to sapratu un tabulās date ir sarakstīts time() funkcijā .... vai kāds lūdzu nepateiktu kā būtu jaizvelk, lai strādā intervāls.... Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 Būtu jāstrādā: date>DATE_ADD(CURDATE(), INTERVAL 1 DAY) Quote Link to comment Share on other sites More sharing options...
marcis Posted August 6, 2010 Report Share Posted August 6, 2010 Леший risinājums strādā, bet pareizākais risinājums būtu izmantot FROM_UNIXTIME() vai UNIX_TIMESTAMP() funkcijas. SELECT `id`, `date` FROM `kkas` WHERE FROM_UNIXTIME(`date`) > DATE_SUB(NOW(), INTERVAL 1 DAY); SELECT `id`, `date` FROM `kkas` WHERE `date` > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 DAY)); Quote Link to comment Share on other sites More sharing options...
goma smile Posted August 6, 2010 Author Report Share Posted August 6, 2010 Paldies ir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.