Although php supports variable function names ,I'm sorry to say that ,databases dont respect us as much as Zeev does 🙂
If you have looked up both mssql and mysql you should see that they have differences at the way we have to build our queries..
But your problem has a solution.. If you have a look at phpbuilder articles you'll find a diary about the cross platform php scripts and the answer they found for your question.
Read it.. You'll like it 😉
have fun with PHP..