Hide and show field
Moderator: General Moderators
Hide and show field
Hi everyone, i wish to create a mail box like outlook, group together the mail according the date. When i click the date just show the mail on that day. I dun want all the data just simply show. It will look messy. Hope can get the respond soon. Thanks a lot!
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Hide and show field
How are you storing the emails? Mysql database?
Re: Hide and show field
ya...
i have a table to store the mail, but when i wan to read, all of them show out! So i wish to hide them according to date. When click it just show
i have a table to store the mail, but when i wan to read, all of them show out! So i wish to hide them according to date. When click it just show
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Hide and show field
Assuming you have used a datetime field to store when the row (email) was inserted into the table, you can use a query similiar to
I'm sure there is a more efficient way, but it's a bit late and I'm off to sleep 
Code: Select all
SELECT * FROM `emails` WHERE DATE(`created`) = CURRENT_DATE()Re: Hide and show field
ok~ thanks 