function to do consecutive

0

good day I have a problem in which I have to perform a function that helps me accommodate some values and perform a consecutive.

I explain.

I have a related table named def_cliente with a field that is called no_sport.

the other table is called def_consecutive with fields

  • rank (which has 5 different ranges)
  • from (field that determines where the range starts)
  • up (field that determines where the range ends)
  • counter (must increase the counter when a client is added)

I wish that when a client with its portfolio number e my def_consecutive table is added to the client's table, the client is added to the corresponding range and its counter increases.

I already have a function that gives me the number on the counter

public function getConsecutiveByRange($rango)
{
   $sql ="SELECT contador FROM def_consecutivo WHERE rango_numeros=:rango";
   return $this->getResponseQueryOne($sql,["rango"=>$rango]);
}

I hope you can help me with this topic.

    
asked by Luis Enrique Gómez Pérez 05.12.2018 в 00:00
source

0 answers