|
Posted by C. on 10/01/06 13:12
Jerry Stuckle wrote:
> Jacques Lebastard wrote:
> >
> > I have a problem writing PHP ODBC scripts that suit both MySQL and
> > PostgreSQL. So far, the following syntaxes seem to apply to each
> > database (this is an 'insert' example; the same differences apply to
> > 'select commands):
> >
> > MySQL: INSERT INTO MyTable (col1, col2) VALUES ("value1","value2")
> > PGSQL: INSERT INTO "MyTable" (col1, col2) VALUES ('value1','value2')
> >
INSERT INTO MyTable (col1, col2) VALUES ('value1','value2')
Should work on both.
>
> However, I question why you'd even use ODBC. If you're using PHP,
> Pear::MDB is much faster and more flexible. It also runs well on every
> platform, unlike ODBC.
>
Alternatively use the dbx_ functions which support several DBMS, or the
adodb class.
C.
Navigation:
[Reply to this message]
|