function db_free($rs)
{
    global $db_driver;
    if (db_is_result($rs)) {
        if ('mysql' == $db_driver) {
            return mysql_free_result($rs);
        }
        if ('pgsql' == $db_driver) {
            return pg_free_result($rs);
        }
    }
}
Exemple #2
0
function db_free($rs)
{
    global $db_driver;
    if (db_is_result($rs)) {
        if ('mysql' == $db_driver) {
            return mysql_free_result($rs);
        } else {
            if ('pgsql' == $db_driver) {
                return pg_free_result($rs);
            } else {
                if ("sqlite" == $db_driver) {
                    return 1;
                }
            }
        }
        // There is no such function in PDO, it is probably freed when you destroy the "$stmt" variable.
    }
}