By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,945 Members | 1,650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,945 IT Pros & Developers. It's quick & easy.

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

P: 6
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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,035
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.