本文整理匯總了PHP中DataBase::getError方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataBase::getError方法的具體用法?PHP DataBase::getError怎麽用?PHP DataBase::getError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataBase
的用法示例。
在下文中一共展示了DataBase::getError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DataBase
<?php
require '../clases/AutoCarga.php';
$bd = new DataBase();
$gestor = new ManageUser($bd);
$email = Request::post("pkemail");
$clave = Request::post("clave");
$alias = $email;
$usuario = $gestor->get($email);
$fechaAlta = $usuario->getFechaAlta();
$activo = $usuario->getActivo();
$administrador = $usuario->getAdministrador();
$personal = $usuario->getPersonal();
$user = new User($email, $clave, $alias, $fechaAlta, $activo, $administrador, $personal);
$r = $gestor->set($user, $email);
$bd->close();
var_dump($bd->getError());
header("Location:index.php?email={$email}&op=edit&r={$r}");
示例2: DataBase
$db = new DataBase("");
//Connect to server
if ($db->execute($createDB)) {
//Create database in non exist
//echo "Successfully Created Database<br/>";
} else {
echo "Error Creating Database: " . $db->getError() . "<br/>";
exit;
}
$db = new DataBase("{$dbName}");
//Connect to database created
/*-- Create tables --*/
if ($db->execute($CreateSectionTable)) {
//echo "Successfully Created Section Table<br/>";
} else {
echo "Error Creating Section Table: " . $db->getError() . "<br/>";
exit;
}
if ($db->execute($CreateProgramsTable)) {
//echo "Successfully Created Academic Programs Table<br/>";
} else {
echo "Error Creating Academic Programs Table: " . $db->getError() . "<br/>";
exit;
}
if ($db->execute($CreatePatternsTable)) {
//echo "Successfully Created Pattern Table<br/>";
} else {
echo "Error Creating Pattern Table: " . $db->getError() . "<br/>";
exit;
}
if ($db->execute($CreateCTPMappingTable)) {