[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL inserts



-----BEGIN PGP SIGNED MESSAGE-----


Excuse my ignorance, but why are you writing actual SQL code and not using
an abstraction layer that guarantees cross DB compliance?  Perl has DBI
which does this, I would think PHP does too?

Perl -> generic DB Interface (DBI) -> DB Driver (DBD) -> MySQL
                                   -> DBD -> Oracle
                                   -> DBD -> SyBase
                                   -> DBD -> mSQL
etc etc.

Basically the goal of DBI/DBD addresses Daniel's (very valid) concern of
if we ever change DB's.  We don't want to recode everything.

- -- 
Aaron Turner           | Either which way, one half dozen or another. 
aturner@pobox.com      | Check out the Red Hat Linux User's FAQ Online!
www.pobox.com/~aturner | http://www.pobox.com/~aturner/RedHat-FAQ/
All emails from this account are PGP signed.  Lack of a signature is "bad".
PGP Key fingerprint = FB E1 CE ED 57 E4 AB 80  59 6E 60 BF 45 1B 20 E8


On Tue, 23 Feb 1999, Daniel E. Markle wrote:

> On Tue, Feb 23, 1999 at 12:29:59AM -0800, Micah Yoder wrote:
> > I read in the MySQL manual that it supports the set syntax.  Anyway, I
> > think that's the best way to do it, because it's easier to read and if
> 
> But do most SQL databases support the set syntax in an insert?  We don't want
> to get so non standard that if we need to change to another db we have to
> change everything, IMHO.  If insert (colnames) into db values (values); is
> more standard, we should use it.
> 
> -- 
> -------------------
> Daniel E. Markle
> syntax@ashtech.net
> 
> Windows NT - Growing at 1/20th the rate of GNU/Linux, and 1/2 the rate of MacOS.
> Perhaps there's a reason?
> -------------------
> 


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNtLT8DM3jpXy1kJtAQF3lAP9Ek7Oyb8a1w7S/z+XwEN94zxnfAfcmvCo
mH11RRg/Ev7nK0XZ1auaHMc0ysM6pXMD3NxgZ+3U4DQzuy/25Z74uLxsTbvwCLVe
ltfl+IqjSM4rUuoCsnX21hf/1OGDbEuLBjzRCsnL73KId2igJnyyHVrJTEluFik7
27btxb0PBBY=
=6CyA
-----END PGP SIGNATURE-----