File manager - Edit - /home/webapp69.cm.in.th/u69319090037/Shop/api/database/update_address_columns.php
Back
<?php require_once __DIR__ . '/../config/db.php'; $db = (new Database())->getConnection(); try { $db->exec("ALTER TABLE users ADD COLUMN address TEXT NULL AFTER phone"); echo "Added 'address' column to 'users' table successfully.<br>\n"; } catch (Exception $e) { echo "users table address column: " . $e->getMessage() . "<br>\n"; } try { $db->exec("ALTER TABLE orders ADD COLUMN shipping_address TEXT NULL AFTER recipient_photo"); echo "Added 'shipping_address' column to 'orders' table successfully.<br>\n"; } catch (Exception $e) { echo "orders table shipping_address column: " . $e->getMessage() . "<br>\n"; } echo "Migration process finished."; ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings