include omitted column name, partial fix to support mariadb 10.1.

This commit is contained in:
Harry G. Coin 2016-04-25 20:44:30 -05:00
parent 96e71eadf7
commit 179f4840a8
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ require_once "resources/paging.php";
$sql = "select ";
$sql .= "(select count(*) from v_extensions where domain_uuid = '".$_SESSION['domain_uuid']."') as num_rows ";
if ($db_type == "pgsql") {
$sql .= ",(select count(*) from v_extensions ";
$sql .= ",(select count(*) as count from v_extensions ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and extension ~ '^[0-9]+$') as numeric_extensions";
}
@ -73,7 +73,7 @@ require_once "resources/paging.php";
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
$total_extensions = $row['num_rows'];
if ($db_type == "pgsql") {
if (($db_type == "pgsql") or ($db_type == "mysql")) {
$numeric_extensions = $row['numeric_extensions'];
}
}