Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to use procedural code with SQLite3?

I prefer to use procedural style code, is there any way to use procedural style code with SQLite3? Or is the only alternative to create the functions as aliases (which seems like a stupid idea)

I would prefer to use something like sqlite3_open() if possible but it doesn't work. If not I guess I'll install SQLite instead.

like image 909
cantsay Avatar asked Oct 26 '25 03:10

cantsay


1 Answers

I've been searching for this too, I was about to write my own extension but I found this wrapper which basically allows you to use your procedural style code and hands over the queries to the PDO extension. You will still have the performance draw back of OOP but at least your code will not change drastically.

The site is in Spanish but you can easily translate it, using chrome or pretty much any modern browser.

Here's the link.

https://www.javiergutierrezchamorro.com/wrapper-php-para-llamadas-procedurales-de-sqlite/

I found it very useful.

like image 95
Darwin Santos Arismendy Avatar answered Oct 28 '25 16:10

Darwin Santos Arismendy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!