0

Hi there.

I was kinda researching on how I could store data at best (in my opinion).
I came on "CSV" files. Which looked great to use. I found out there are
two functions that can operate file. So I keep Googling on how to use
the syntax and how all this crap works. But I couldn't understand jack
although PHP is relatievely easy and I have worked with it. I know SQL
which will be much more easier to me to manage the data, plus, it has
some additional functions.

So I was wondering if there is a file that I could include (); and I
would be able to use SQL syntax on the CSV file and receive real working
data.

Edited by RikTelner

2
Contributors
3
Replies
16
Views
3 Years
Discussion Span
Last Post by cereal
0

I don't know if there is anything in PHP, but there is a tool written in Python:

Otherwise you can check the SQLite library, it's used with sqlite files:

But files and sqlite are, generally, good to save little data, if your application will be used by multiple users and deal with many MB of data then it's better to use a relational database. In alternative take a look at NoSQL solutions:

Edited by cereal

0

Ok, SQLLite, seems being able to do it. But... how to protect it?
I mean, you click on it twice and whole database is in your hand.

By the way. You solved another pending question, no one was able to.

Edited by RikTelner

0

You can limit the access to the file by saving it outside the webroot, or if you cannot, by applying an .htaccess rule to limit the access to a path directory or to a specific filetype. A part this, there are some chipers for sqlite files, for example:

But you have to install and enable the module.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.