mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-11 13:30:23 +02:00
More PgSql updates
This commit is contained in:
parent
8aa16110d5
commit
b9cab663e0
11 changed files with 26 additions and 32 deletions
|
@ -165,13 +165,7 @@ function processDomainRenew($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$to = $stmt->fetchColumn();
|
||||
|
||||
// Insert into statement:
|
||||
if ($database_type === "mysql") {
|
||||
$stmt = $db->prepare("INSERT INTO statement (registrar_id, date, command, domain_name, length_in_months, from, to, amount) VALUES (?, CURRENT_TIMESTAMP(3), ?, ?, ?, ?, ?, ?)");
|
||||
} elseif ($database_type === "pgsql") {
|
||||
$stmt = $db->prepare('INSERT INTO statement (registrar_id, date, command, domain_name, length_in_months, "from", "to", amount) VALUES (?, CURRENT_TIMESTAMP(3), ?, ?, ?, ?, ?, ?)');
|
||||
} else {
|
||||
throw new Exception("Unsupported database type: $database_type");
|
||||
}
|
||||
$stmt = $db->prepare("INSERT INTO statement (registrar_id, date, command, domain_name, length_in_months, fromS, toS, amount) VALUES (?, CURRENT_TIMESTAMP(3), ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->execute([$clid['id'], 'renew', $domainName, $date_add, $from, $to, $price]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue