當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。