当前位置: 首页>>代码示例>>PHP>>正文


PHP DataBase::getError方法代码示例

本文整理汇总了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}");
开发者ID:Mariangeles94,项目名称:practica_gestion_usuarios,代码行数:18,代码来源:phpedit.php

示例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)) {
开发者ID:charberg,项目名称:CSA,代码行数:31,代码来源:install.php


注:本文中的DataBase::getError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。