24 lines
527 B
PHP
24 lines
527 B
PHP
<?php
|
|
session_start();
|
|
|
|
require '../../../assets/utils/db_auth.php';
|
|
|
|
|
|
$sql = "SELECT SUM(capacity) as total_capacity, count(*) as total_warehouse
|
|
FROM md_warehouse a
|
|
WHERE
|
|
a.company_id = :company_id
|
|
";
|
|
$sth = $pdo2->prepare($sql);
|
|
$sth->execute([
|
|
":company_id" => $company_id
|
|
]);
|
|
db_check($sth, $answer);
|
|
|
|
$output = $sth->fetch(PDO::FETCH_ASSOC);
|
|
|
|
$answer["output"] = $output;
|
|
$answer["success"] = 1;
|
|
exit(json_encode($answer));
|
|
|
|
?>
|