SQL Class/Abstraction?

Soldato
Joined
25 Oct 2006
Posts
5,395
I'm developing a script which accesses and inserts/reads data from a database. I have looked at the software it is based upon (this script will use some similar queries) and noticed that it uses adodb with calls like this:

PHP:
function NextAid()
{
	$aid = $GLOBALS['db']->GetRow("SELECT MAX(aid) AS next_aid FROM `" . DB_PREFIX . "_admins`");
	return ($aid['next_aid']+1);
}

I have never looked into adodb before, would it be worthwhile? Or is there another, possibly simpler way.

I like the way that it's all on one line instead of writing the query, then executing it, then reading from it.

Thanks for any suggestions/ideas
 
Back
Top Bottom