php mysql pdo SELECT SUM

Автор: | 21.01.2021

php mysql pdo SELECT SUM

$sql = $pdo->prepare("SELECT SUM(quantity) FROM card WHERE phone='$phone'");
$sql->execute();
$row = $sql->fetchColumn(0);
Раздел: Php