kamshory / ZKLibrary

ZKLibrary is PHP library for reading and writing data to attendance device using UDP protocol. This library useful to comunicate between web server and attendance device directly without addition program. This library is implemented in the form of class. So that you can create an object and use it functions.
GNU General Public License v2.0
194 stars 176 forks source link

Join User and Attendace #51

Open adsants opened 5 years ago

adsants commented 5 years ago

getUser : [0]=> string(6) "331201" [1]=> string(23) "Mr. AAA" [2]=> string(11) "0000000000 " [3]=> int(1) [4]=> int(0) [5]=> string(0) "" [0]=> string(6) "909213" [1]=> string(23) "Mr. BBB" [2]=> string(11) "0000000000 " [3]=> int(1) [4]=> int(0) [5]=> string(0) "" getAttendance : [0]=> int(255) [1]=> int(333) [2]=> int(0) [3]=> string(19) "2018-09-27 17:22:01" [0]=> int(184) [1]=> int(117) [2]=> int(0) [3]=> string(19) "2018-09-27 17:22:03" [0]=> int(244) [1]=> int(333) [2]=> int(0) [3]=> string(19) "2018-09-27 17:22:20" [0]=> int(144) [1]=> int(333) [2]=> int(0) [3]=> string(19) "2018-09-27 17:22:26" [0]=> int(234) [1]=> int(333) [2]=> int(0) [3]=> string(19) "2018-09-27 17:22:45"

question : How to join getUser -> $userid (331201 / 909213 ) with getAttendance ..?

thanks :)

kamshory commented 5 years ago

You can not. This library designed only for read and write data to attendance device. I you want to join the data, first you must store user data and attendance data into your database and you can join the data. User data is more static but attendance data is more dynamic. Combine process to get it together is bad idea.