mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-07 13:22:15 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
eb1d5b03fb
@ -201,7 +201,11 @@ class Generator
|
||||
$maschera = Generator::complete($maschera, [], $date);
|
||||
$maschera = str_replace('#', '%', $maschera);
|
||||
|
||||
$query = Manager::table($table)->select($field)->where($field, 'like', $maschera)->orderByRaw($order);
|
||||
//Lunghezza maschera
|
||||
$mask_length = strlen($maschera);
|
||||
|
||||
$query = Manager::table($table)->select($field)->where($field, 'like', $maschera)->whereRaw('LENGTH( numero_esterno )<='.$mask_length)->orderByRaw('LENGTH(numero_esterno) DESC')->orderByRaw($order);
|
||||
|
||||
|
||||
foreach ($where as $and) {
|
||||
$query->whereRaw($and);
|
||||
|
Loading…
Reference in New Issue
Block a user