[KLUG Members] database programming question

Adam Tauno WIlliams adam at morrison-ind.com
Tue Jun 22 16:05:12 EDT 2004


> First off you're talking duplication of data.  There is already some
> membership information in Postgresql (supporting member database). 
> Do I need to explain why duplication of data is bad?

There is also data off-site in a groupware server.  Just to add some
more fun. :)

> This is a volunteer organization.  No money (or other compensation) is
> exchanged for services rendered.  Anyone who has been involved in a
> volunteer organization knows how hard it is to get anything done.

Yep, and you need to get people to voluntarily agree!  See how much fun
that can be? ... Actually with this group it tends to be a hoooot, one
of the many reasons I've stuck around.  

Officers meetings are often like the spanish inquisition minus all the
blood and pesky religion. :)

> It took us what, two years, to get someone to buy a toner cartridge for
> a printer donated to KLUG?  I'm not picking on Brian here, 

Nah, don't hold back!  It is all Brian's fault!


> If the name of the php command is the only difference for using MySQL
> vs. PG, what's the difference as far as PHP programming is concerned?
> That's what I'm trying to figure out.  I haven't done much with MySQL &
> PHP, so maybe the PHP code is easier.  If so, please enlighten me.
> I'm not against MySQL, but I'd want to convert everything to MySQL to
> standardize on programming and lack of duplication.
> I'm also would like reasons to justify the time to do the conversion.
> > I think the popularity of MySQL on websites makes my case there too.
> Popularity doesn't hold any credibility with me.  A Ford Escort may be
> more popular than a Cadillac, but it doesn't mean it's "better".
> </bad analogy>

Ouch.  I had three Ford Escorts.  MySQL is better than that.  A Ford
Escort is like dBase III.

> > > The "select" statements are basically the same, aren't they? 
> > The select statement is almost always the same as they're both SQL
> > (Structured Query Language), a standardized way of querying dbs.
> What I figured.
> > $result=mysql_query($sql);
> > //or 
> > $result=pg_query($sql);
> > All of these are PHP statements.
> As I suspected.
> So, you're willing to help us if you can write PHP that says
> "mysql_query", but not if you have to spell it as "pg_query"?
> Why?

Well, I think the issue is testing.  It is easier to write a script for
which you have a local db to test against, than one where you don't.

> Howabout if we spell it "odbc_query"?  (or whatever the ODBC call is)
> Then you won't have to know which DB you're using.  :-)

I like it!

> > Practically speaking you need 
> > 1. to have an efficient method of checking and handling errors (the web
> > guarantees you'll have untrained people doing weird things, you need to
> > catch all these).
> Right ...  And PG reports errors too.  Why are MySQL's errors better?

Error handling can be different between backends, one of the real
problems.  Of course there is always the aforementioned ODBC....

And we already have "untrained people doing weird things"!  But it beats
no one doing nothing?



More information about the Members mailing list