PHP implementation of SQL

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

PHP implementation of SQL

Post by alex.barylski »

Anyone know if anyone has attepted this or not?

Not incredibly useful, but it would be a neat project...

And really cool in scenerios where an app used AdoDB and determined SQL wasn't available and your app could default to PHP SQL... :)

Just curious :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

sqlite is close.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Roja wrote:sqlite is close.
It's also implemented in C ;)

Porting is out of the question...I've looked at the code for SQLite numerous times...it would be anything but trivial...

I wanted something in native PHP, just because the number and variation of hosts out there whom support MySQL, PostGre or both or none...

At least when you search for PHP hosting...you know at the very least you'll likely get PHP installed as a minimum...

SQLite would be an excellent guideline though...if one were interested writing a PHP SQL engine. :roll:

Cheers :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Hockey wrote:I wanted something in native PHP, just because the number and variation of hosts out there whom support MySQL, PostGre or both or none...
My point was that the challenge you are looking to acheive is going to be solved in time.

PHP5 comes with sqlite included by default. As a result, if mysql/postgresql isn't available, sqlite will be.
Hockey wrote:At least when you search for PHP hosting...you know at the very least you'll likely get PHP installed as a minimum...
Which is why I brought up SQLite. If you have PHP5+, you have SQLite.

Since it is extremely unlikely that someone would complete a workable SQL replacement before PHP5+ is widely deployed, doesn't seem worthwhile when SQLite is available.

Interesting technical challenge, perhaps, but the (very) small niche it would be useful for is already going to be solved "any day now".
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Included by default eh? Interesting...

However, doesn't this mean, a host could disable SQLite?

The beauty of PHP code is that it'll always be available and likely run any most machines...

how I see it anyways :P
Post Reply