I am searching to produce a good way for any user to produce a table, and upload it towards the server using ftp. Around the server side, Let me query this table as an SQL-like query.

As I would like the consumer to edit this in something similar to OO Calc, or MS Stand out, would csv files be the greatestOrquickest to parse? Does a fgetcsv a great way? Would you suggest any options?

Your best choice would be to allow customers to upload a CSV file using the first line that contains area names (and perhaps area types (i.e. int, varchar, etc)). You'll be able to parse it and validate it for valid/malicious data. Whether it passes inspection then produce a database table getting away all relevant data that after this you can query from.

By doing this you don't only validate the information first, that is usually a good idea, however, you control everything such as the naming of tables, etc, which keeps your computer data from malicious hands.

When the user must create table provide him use of phpMyAdmin (obviously correctly guaranteed). That may support uploading data, too.

I believe CSV will be the simplest factor to utilize and will also be extremely fast. Browse the fgetcsv() function. Read the file into an assortment and check using that. In case your files aren't huge as well as your queries are standard, you'll be able to write your personal search code and never be worried about utilizing a database.

If you want to handle any query your user types in, then you will want to maneuver the information into an SQL compatible database to question.

I have carried this out before using XML. The excellent factor relating to this is you can place data that is not flat (parent child associations). If a person is getting you load a table chances are that eventually they'll request you need to do include child information.