A rainy saturday spent with SQLite

I’d been meaning to get my mits on SQLite for some time and finally found a good project to do so.

Installing SQLite

I’m on ubuntu so the following got things sorted for me:

I then noticed I was getting the following 

I needed to install the following as per this post and restart my web server Check SQLite is installed

Finally, some working php code

While I won’t share my production code with you, here’s what I can share

References: https://www.tutorialspoint.com/sqlite/sqlite_php.htm https://www.digitalocean.com/community/tutorials/how-and-when-to-use-sqlite As per the tutorial above, I created the WINES table and populated it: The following code reads my SQLite db ‘test.db’ and outputs the rows from the WINES table to an HTML table. Here;s what my output looks like: I grabbed the CSS for the table styling from here.

Backing up your SQLite database

JSON REST API Issues with WordPress Gutenberg

While writing up this post I ran into JSON REST API issues. This post from StackOverflow eventually saved me 🙂

here’s my .htaccess file:

I also had to follow the instructions from this post to install the Basic Auth plugin

Leave a Reply

Be the First to Comment!

Notify of