0

Here is my current plan:

  1. HTML button calls jQuery function
  2. Function loads PHP script
  3. PHP script executes shell script
  4. shell script calls SQLite
  5. SQLite runs SQL script that creates CSV
  6. Webpage reads CSV

Is there a simpler method? I tried sql.js but it seems to have some issues with csv files.

Community
  • 1
  • 1
qwr
  • 9,525
  • 5
  • 58
  • 102
  • Well most access to a database requires the basic steps you mention. How to access the database differs. Did you look at a different php library to access the db to make it easier? – epascarello Dec 24 '15 at 21:57
  • @epascarello I hope it does not sound too bad that I have no desire to learn php and a library... – qwr Dec 24 '15 at 22:06

1 Answers1

0

Assuming you want the database stored on the server, then you aren't going to get any simpler then:

  1. JavaScript sends data in HTTP request
  2. Server side program constructs SQL query
  3. SQL query gets run by database

You can eliminate shelling out by using a PHP SQLite library.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335