sqldo.php
function sqldo($query, $howparse = "", $querydb = "") {
// DB change for the query?
        if (!empty($querydb)) {
                $retvar = mysql_db_query($querydb, $query) or die("x203 - ".mysql_error());
        } else {
// Otherwise just do the query
                $retvar = mysql_query($query) or die("x203 - ".mysql_error());
        } 
 
// Parse the query as requested (if requested :P)
        if ($howparse == "fetch_array") {
                $rows = array();
                while ($row = mysql_fetch_assoc($retvar)) {
                        $rows[] = $row;
                }
                if (!empty($rows)) {
                        return $rows;
                } else {
                        return;
                }
        } else if ($howparse == "fetch_assoc") {
                return mysql_fetch_assoc($retvar);
        }
 
        return $retvar;
}