本文整理汇总了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)) {