Looking at some stuff, it seems that a good thing to start practicing is doing some database abstraction...
I've been looking at some examples (PHPLib's db_mysql , some random code here and there)..
One thing that I'm a little unsure of is the following..
say I had a situation where I wanted to grab two different result sets from the database... (say I wanted to grab a bunch of news records from one table... and I wanted to grab say a color scheme from another table)...
It looks like I have two options:
a) I would need to create two instances of my DB class.. which would create two separate connections. This doesn't seem to be good practice to me... am i wrong?
b) I would need to create one instance, perform a query.. store the records in an array.. and then perform a second query.. store the records in an array... and then later on in the page cycle through the array.
Which is the more performed practice? And is there another way that I'm not thinking of?