Jump to content

Proper DB Abstraction


Cardale

Recommended Posts

I wanted to make sure I had proper abstraction since I've never used any other databases besides mysql..

 

example

$newsget = "SELECT * FROM templates WHERE id='1'"; // this is the line im talking about
	$query = $DB->query($newsget);
while($r=$DB->fetch_assoc($query))
{
	$id				=	$r["id"];
	$name			=	$r["name"];
}

 

Just wanted to know is the $var - $newsget should be broken in my abstraction class so I can use different databases in the future if need be.

Link to comment
https://forums.phpfreaks.com/topic/92685-proper-db-abstraction/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.