I am pretty experienced in PHP nowadays. I am even more experienced with different databases. I am working on a complete suite that works with all major DBMS such as MySQL, PostgreSQL, Oracle, MaxDB, ...
The problem is not the portability, the problem I am facing is How to do it the best way. Currently I have a pretty wild idea, which I don't see anyone using yet: Own SQL language built-in the PHP script. Well now probably most people think "it's not used by anyone, because it's complicated". Actually, it's not complicated at all for its users. The people who code modules for my script only need to crawl through the documentation for about 10 minutes to find out what the language can do and how it works. Since module writters already know PHP and SQL, it would not be such a big deal.
The language itself is somewhat "standard SQL". An example query:
Code: Select all
SELECT "name","email" FROM "members" WHERE "id"="1" LIMIT 5 OFFSET 10;Let's look at the pros and cons.
Pros
- Portability: works in all major DBMS. Module writters do not need to worry about anything. They can safely test their SQL on any DBMS they like.
- Complicated SQL Select queries are possible. Unlike with OOP chaining or other DB systems where you use premade methods to construct queries, in typical SQL clauses you can easily write whatever you want and it will work - regardless it is complicated SELECT query or not.
Cons
- Some people are stereotypes and think at first "Oh my god, I have to learn ANOTHER SQL language. Sigh!". Therefore, I might lose some potential module writters.
Now it is your time to throw your thoughts. Pros and cons, I want to hear both from you! Not just applauses "Great idea!" or negative feedback "You are such a stupid man".
Constructive feedback, thank you.