10 lines
351 B
PHP
10 lines
351 B
PHP
|
<?php
|
||
|
class Address extends AddressCore {
|
||
|
public static function getTotalOfCustomerAddress($id_customer, $active = true) {
|
||
|
return DB::getInstance()->getValue('
|
||
|
SELECT count(*) as nbAddress
|
||
|
FROM `'._DB_PREFIX_.'address`
|
||
|
WHERE `id_customer` = '.(int)($id_customer).' AND `deleted` = 0'.($active ? ' AND `active` = 1' : '')
|
||
|
);
|
||
|
}
|
||
|
}
|