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


PHP bd::errorInfo方法代码示例

本文整理汇总了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);
开发者ID:darwinv,项目名称:vogues,代码行数:31,代码来源:add_sch_message.php

示例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");
     }
 }
开发者ID:darwinv,项目名称:sambilnew,代码行数:37,代码来源:usuarios.php


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