mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-20 09:35:59 +02:00
More PgSql updates
This commit is contained in:
parent
8aa16110d5
commit
b9cab663e0
11 changed files with 26 additions and 32 deletions
|
@ -73,7 +73,7 @@ try {
|
|||
|
||||
$to = $dbh->query("SELECT exdate FROM domain WHERE id = '$domain_id' LIMIT 1")->fetchColumn();
|
||||
|
||||
$stmt_insert_statement = $dbh->prepare("INSERT INTO statement (registrar_id,date,command,domain_name,length_in_months,from,to,amount) VALUES(?,CURRENT_TIMESTAMP,?,?,?,?,?,?)");
|
||||
$stmt_insert_statement = $dbh->prepare("INSERT INTO statement (registrar_id,date,command,domain_name,length_in_months,fromS,toS,amount) VALUES(?,CURRENT_TIMESTAMP,?,?,?,?,?,?)");
|
||||
$stmt_insert_statement->execute([$reid, 'transfer', $name, $date_add, $from, $to, $price]);
|
||||
|
||||
$stmt_select_domain = $dbh->prepare("SELECT id,registrant,crdate,exdate,lastupdate,clid,crid,upid,trdate,trstatus,reid,redate,acid,acdate,transfer_exdate FROM domain WHERE name = ? LIMIT 1");
|
||||
|
|
|
@ -51,7 +51,7 @@ try {
|
|||
$dbh->exec("UPDATE registrar SET accountBalance = (accountBalance - $price) WHERE id = '$clid'");
|
||||
$dbh->exec("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES('$clid', CURRENT_TIMESTAMP, 'autoRenew domain $name for period 12 MONTH', '-$price')");
|
||||
list($to) = $dbh->query("SELECT exdate FROM domain WHERE id = '$domain_id' LIMIT 1")->fetch(PDO::FETCH_NUM);
|
||||
$sth = $dbh->prepare("INSERT INTO statement (registrar_id, date, command, domain_name, length_in_months, from, to, amount) VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?, ?, ?, ?)");
|
||||
$sth = $dbh->prepare("INSERT INTO statement (registrar_id, date, command, domain_name, length_in_months, fromS, toS, amount) VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?, ?, ?, ?)");
|
||||
$sth->execute([$clid, 'autoRenew', $name, '12', $exdate, $to, $price]);
|
||||
if (!$dbh->query("SELECT id FROM statistics WHERE date = CURDATE()")->fetchColumn()) {
|
||||
$dbh->exec("INSERT IGNORE INTO statistics (date) VALUES(CURDATE())");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue