select with date only for datetime row

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jim_php
Forum Newbie
Posts: 16
Joined: Sat Mar 22, 2008 6:16 am

select with date only for datetime row

Post by jim_php »

hello i have one table with one column called "added "and type "datetime"
for example in one sign the added row has the value "2008-01-25 12:30:20"

i want in mysql query load only by date like mysql_query(select * from signs where added = '2008-01-25'")or die();

but because the row has and the time stamp dont load these value ...

any idea to select well ?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: select with date only for datetime row

Post by Weirdan »

Code: Select all

SELECT * FROM TABLE WHERE date(added)='2008-01-01'
jim_php
Forum Newbie
Posts: 16
Joined: Sat Mar 22, 2008 6:16 am

Re: select with date only for datetime row

Post by jim_php »

gery thanks my friend ;)
Post Reply