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
199 stars 180 forks source link

Get Big Amount of Attendance Data #18

Open dilshanvitte opened 6 years ago

dilshanvitte commented 6 years ago

We have a very big amount of data which take much time, some time connection has timeout, but I want to get the data of a specific date or limit data per request. How it would be possible. Please guide me to solve this issue. Thank you so much.

kamshory commented 6 years ago

You can not do it. The only way to make it work faster, you must delete all attendance data after you copy it to your database.

chakravais commented 5 years ago

Hello Sir, is it possible to make changes , so that the php code will retrive only specified amount of attendance records not from the beggining but from below ?

kamshory commented 5 years ago

No. It is impossible.

chakravais commented 5 years ago

Thanks for quick reply My challenge is, In machine there are around 1,00,000 attendance records (last 6 months) whenever I try to run script to read and add those attendance to database, script hangs ..i waited for more than 30 min, but on production server i cannot wait more than that.. so i terminated manually... my clients also dont want to erase records from machine...what to do...?

kamshory commented 5 years ago

It's better for you copy all attendance data to your local database before you send it to online database. After you finish copy all of them, you should clear attendance data on your device. Next time, you should clear all attendance data after you send it to your database.

Nashkhan333 commented 4 years ago

@kamshory sir how to put all data in my local database as after showing 6months data it give error. Fatal error: Maximum execution time of 50 seconds exceeded while there is 2 years data in it and very unfortunately, it start in ASC order :(

Nashkhan333 commented 4 years ago

Like is there any code which get single record from machine attendance, If mysql insert query successful then it delete same record(row) from machine database(attendance). Looking forward for your kind help. Bundle of thanks for your work and support