Initial commit: 교육 프로젝트 배포
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/db_conn.php';
|
||||
|
||||
try {
|
||||
$pdo = db_conn();
|
||||
echo "DB Connected.\n";
|
||||
|
||||
// Check procedure
|
||||
$stmt = $pdo->query("SHOW PROCEDURE STATUS WHERE Db = 'baronhomep' AND Name = 'sp_insert_edu_access_log'");
|
||||
$proc = $stmt->fetchAll();
|
||||
if (empty($proc)) {
|
||||
echo "Procedure sp_insert_edu_access_log DOES NOT EXIST.\n";
|
||||
} else {
|
||||
echo "Procedure sp_insert_edu_access_log exists.\n";
|
||||
}
|
||||
|
||||
// check if u.belong_comp exists
|
||||
$stmt = $pdo->query("SHOW COLUMNS FROM edu_users LIKE 'belong_comp'");
|
||||
$col = $stmt->fetchAll();
|
||||
if (empty($col)) {
|
||||
echo "Column belong_comp DOES NOT EXIST in edu_users.\n";
|
||||
} else {
|
||||
echo "Column belong_comp exists.\n";
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo "Basic Error: " . $e->getMessage() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user