Avatar of swetha chowdaram
swetha chowdaram
 asked on

Need PHP code for the below mysql query

SELECT id userid  max(checktime) FROM adms_db.checkinout where checktype = 1 group BY DAY (checktime),userid

SELECT * FROM adms_db.checkinout where checktype = 0 GROUP BY DAY(checktime),userid


Basically Im trying get attendance report users.

main tables:

checkinout
userinfo
departments


PHP 5.6
MySQL

database: adms_db
root
no password
PHPMySQL ServerHTML

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ray Paseur

If you're new to PHP and need some good "getting started" resources, this article may be able to help.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

If you're experienced with PHP and just need some MySQL guidance, this article has examples that map the various ways of using the MySQL extensions (both old and new).
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_11177-PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
swetha chowdaram

ASKER
Need hint or code for achieving this....

My programmer is struggling, but he is not able to do
SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61