use the same variable in 2 php functions

0

I have this function

public function getConsecutiveByRange($rango)
    {
        $sql ="SELECT contador, rango_numeros FROM def_consecutivo WHERE rango_numeros=:rango";

        return $this->getResponseQueryOne($sql, ["rango"=>$rango]);

    }

how can I use the $ range variable in another function

public function putAddConsecutiveClient($noCarteraSap)
{
    $sql ="SELECT iddef_consecutivo, rango_numeros, contador FROM def_consecutivo WHERE :no_cartera_sap  BETWEEN desde AND hasta";
    $modelConsecutivo =  $this->getResponseQueryOne($sql, ["no_cartera_sap"=>$noCarteraSap]);
    $modelConsecutivo->rango = $modelConsecutivo->rango + 1;

    return $this->getResponseQueryOne($sql,[$modelConsecutivo]);
}

tells me that the variable range is not defined

greetings

    
asked by Luis Enrique Gómez Pérez 11.12.2018 в 16:57
source

0 answers