<?php
/* Mantenimiento de los registros de la tabla cr_prestamo_file redefinidos por el usaurio */
class Cr_prestamo_fileDP extends BaseCr_prestamo_fileDP
{
    public static function getNextId()
    {
        $s_Sql = "SELECT IF( MAX( IdPrestamoFile ) IS NULL, 1, MAX( IdPrestamoFile ) + 1 ) I_ID FROM cr_prestamo_file;";
        $o_Resource = Conexion2::getConexion()->getResource();
        $o_SQLResult = mysql_query( $s_Sql, $o_Resource );
        if( $o_SQLResult )
        {
            $a_SQLRow = mysql_fetch_object( $o_SQLResult );
            return ( int ) $a_SQLRow->I_ID;
        }
        return 1;
    }
}
?>