Store table data on the device.

Asked

Viewed 22 times

0

I am developing an application for a company where makes meal orders, this application is in PHP, as I am new in the area wanted to know if it is possible to have the employee base saved on the tablet, so when typing the employee’s registration he load the name without having to make a request on the server, in order to consume less mobile data. I don’t know have a list or array that would have that information.

  • 1

    No. The PHP cannot work with files or database on the client side. Maybe the best solution for your case is to use js.

  • 1

    You can create a JSON in JS and search the name by registration.

  • 1

    Just an addendum: depending on the size of your database, it might not even be worth it. Just to give you an idea, an api that returns name, email, id, avatar, city, state, country, situation (status), creation and modification dates consumes about 800 bytes, with GZIP this value can reach 400 bytes.

1 answer

0

In PHP it is not possible to do this, after all PHP is a web language that runs only on the server side. One way to do this would be to develop an application that can be in android for example, and use a Sqlite bank on mobile/tablet to store employees, but even with this solution the application would still have to make some requests to update its records if a new employee was added to the database. Usually when we develop some application in PHP that will be used by some company we expect the company to provide a larger data package for employees, or the application to be used internally using a Wifi network ( if used by mobile devices ).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.