vendredi 28 août 2015

How can I use SQLite 3 within PHP but access procedural methods from SQLite 2?

I've been having some problems working with SQLite today. I'm running SQLite version 3.8.10.2, PHP version 5.5.27, and OS X version 10.11 (El Capitan Beta 7). I was able to use the traditional SQLite3 approach (there's apparently no procedural support for it..?) but I wanted to use the equivalent of fetchAll() which is available for SQLite2.

So far the closest thing I've found is some hacky trick where you use fetchArray. This is an awkward method because it returns the next row of data each time you call it. I've seen some comments while searching for an answer earlier today which had used a while loop of some sort. I'd much rather use a fetchAll() method but that doesn't exist in SQLite3 -- only in SQLite2.

After sitting here and recompiling stupid PHP all day long and configuring my computer to hell and back I still can't use the old methods. What do I need to do in order to access those within my scripts?

Last Note: The message I see is Call to undefined function sqlite_open(). That's because it's an SQLite2 method, of course.

Aucun commentaire:

Enregistrer un commentaire