MySQL Forums
Forum List  »  PHP

Where to find tutorials on portable SQL for PHP and (MySql Oracle PostgreSQL MS SQL)
Posted by: Tore Krudtaa
Date: April 25, 2006 08:01AM

I'm developing an application that the customers should be possible to use
against different databases.

Does anyone know about some good online tutorials on:

How to write portable SQL for PHP and the following databases:
MySql
Oracle
PostgreSQL
MS SQL

Example of issues that must be solved:

Example 1:

$fldList = "1,2,3,6,10";
$query = "SELECT t1.f1 FROM t1 WHERE t1.f1 IN ($fldList) ....";

Will it work in all these databases, and what if the $fldList = "", will it still work, and if it works, do the databases handle this differently?

Example 2:
I have a field in the prototype application which now is an integer
(using MySql for the prototype).

This is now storing date-time values as UNIX timestamps.
That has some limitations regarding which date-time values I can store, so
I'm considering to use the datetime type in MySql instead.
So then... will I be able to use a similar field type in the other databases?

Just some examples. Would be nice to find a few good portability documents
targeting PHP and the databases above, in order to shorten the trial and error
road.

Options: ReplyQuote


Subject
Written By
Posted
Where to find tutorials on portable SQL for PHP and (MySql Oracle PostgreSQL MS SQL)
April 25, 2006 08:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.