468,119 Members | 1,809 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

how to display first record for a day in php mysql by date for 1 week

actually i have 30 day data for employees in which employee have multiple record for 1 day. i want to display one record for every
day in php mysql. plz how do i select i am trying like

Expand|Select|Wrap|Line Numbers
  1. select * from Employee_entry where emp_id=2 and month=04 and year=2019 group by created_at;
but it showing all record for an employee for 30 day
but i need per day one record only.
Apr 17 '19 #1
1 994
Luuk
1,043 Expert 1GB
It's hard to give a correct answer to your question if we do not know your table definition.
Can you post the output of:
Expand|Select|Wrap|Line Numbers
  1. show create table Employee_entry;
Also can you give a short example of 1 employee with some records, and the 'desired' output of your query?
Apr 21 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by dr. zoidberg | last post: by
5 posts views Thread by Hardy Wang | last post: by
3 posts views Thread by amerar | last post: by
4 posts views Thread by sweetpotatop | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.