本文整理汇总了PHP中bd::errorInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP bd::errorInfo方法的具体用法?PHP bd::errorInfo怎么用?PHP bd::errorInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bd
的用法示例。
在下文中一共展示了bd::errorInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cleanMessage
} else {
$img = $_POST['img'];
}
} else {
$img = "";
}
$message = cleanMessage($_POST['message'], $max_chars, $userid);
if (!is_numeric($message) || $message > 5) {
$fields = array('userid' => $userid, 'message' => $message, 'img' => $img, 'time_start' => $_POST['time_start'], 'time_end' => $_POST['time_end'], 'days' => $_POST['days'], 'hour' => $_POST['hour'], 'publish_fb' => $_POST['publish_fb'], 'publish_tw' => $_POST['publish_tw'], 'publish_fbp' => $_POST['publish_fbp'], 'publish_fbgp' => $_POST['publish_group']);
if (is_array($fields = makeTimes($fields))) {
if ($_POST['edit'] == true) {
unset($fields['userid']);
if ($hdb->doUpdate($table, $fields, " id=" . $hdb->quote($_POST['mes_id']) . " AND userid=" . $hdb->quote($userid))) {
$return = array("e" => 0, "c" => array("i" => $_POST['mes_id'], "m" => $fields['message'], "p" => $fields['img'], "ts_es" => formatTimeStamp($fields['time_start']), "ts_en" => date('Y-m-d', $fields['time_start']), "te_es" => formatTimeStamp($fields['time_end']), "te_en" => date('Y-m-d', $fields['time_end']), "t_p" => $fields['img'], "d" => $fields['days'], "h" => formatHour($fields['hour']), "tw" => $fields['publish_tw'], "fb" => $fields['publish_fb'], "fbp" => $fields['publish_fbp'], "gp" => $fields['publish_fbgp']));
} else {
error_log($hdb->errorInfo());
$return = array("e" => 2);
}
} else {
if ($hdb->doInsert($table, $fields)) {
$return = array("e" => 0, "c" => array("i" => $hdb->lastInsertId(), "m" => $fields['message'], "p" => $fields['img'], "ts_es" => formatTimeStamp($fields['time_start']), "ts_en" => date('Y-m-d', $fields['time_start']), "te_es" => formatTimeStamp($fields['time_end']), "te_en" => date('Y-m-d', $fields['time_end']), "t_p" => $fields['img'], "d" => $fields['days'], "h" => formatHour($fields['hour']), "tw" => $fields['publish_tw'], "fb" => $fields['publish_fb'], "fbp" => $fields['publish_fbp'], "gp" => $fields['publish_fbgp']));
} else {
error_log($hdb->errorInfo());
$return = array("e" => 2);
}
}
} else {
$return = array("e" => $fields);
}
} else {
$return = array("e" => $message);
示例2: crearUsuario
public function crearUsuario()
{
if (isset($this->n_identificacion) xor isset($this->j_rif)) {
if (isset($this->a_seudonimo)) {
$bd = new bd();
$result = $bd->doInsert($this->u_table, $this->serializarDatos("u_"));
if ($result == true) {
$result = 0;
$this->id = $bd->lastInsertId();
$hnsc = new Handler_NewSocialConnection();
if ($red_social = $hnsc->returnTableAndBody($this->id)) {
if (!$bd->doInsert($red_social['table'], $red_social['fields'])) {
error_log('Error occurred:' . implode(":", $bd->errorInfo()));
}
}
if (isset($this->n_identificacion)) {
$result += $bd->doInsert($this->n_table, $this->serializarDatos("n_", $this->u_table));
} else {
$result += $bd->doInsert($this->j_table, $this->serializarDatos("j_", $this->u_table));
}
$result += $bd->doInsert($this->a_table, $this->serializarDatos("a_", $this->u_table));
$result += $bd->doInsert($this->s_table, $this->serializarDatos("s_", array($this->s_f_table, $this->u_table)));
if ($result >= 3) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
throw new Exception("Error Usuario 004: No se han definido datos de acceso");
}
} else {
throw new Exception("Error Usuario 003: No se han definido datos Juridicos o Naturales");
}
}