本文整理匯總了PHP中DedeSql::GetError方法的典型用法代碼示例。如果您正苦於以下問題:PHP DedeSql::GetError方法的具體用法?PHP DedeSql::GetError怎麽用?PHP DedeSql::GetError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DedeSql
的用法示例。
在下文中一共展示了DedeSql::GetError方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: time
$bcatid = 0;
}
if (empty($booktype)) {
$booktype = 0;
}
$addtime = time();
//處理上傳的縮略圖
if (!isset($isremote)) {
$isremote = 0;
}
$bigpic = UploadOneImage('imgfile', $imgurl, $isremote);
$adminID = $cuserLogin->getUserID();
//----------------------------------
$inQuery = "\n UPDATE `#@__story_content` SET `title`='{$title}',`bookname`='{$bookname}',\n `chapterid`='{$chapterid}',`sortid`='{$sortid}',`bigpic`='{$bigpic}'\n WHERE id='{$cid}'\n";
if (!$dsql->ExecuteNoneQuery($inQuery)) {
ShowMsg("把數據保存到數據庫時出錯,請檢查!" . str_repolace("'", "`", $dsql->GetError() . $inQuery), "-1");
$dsql->Close();
exit;
}
$arcID = $cid;
//生成HTML
//---------------------------------
//$artUrl = MakeArt($arcID,true);
if (empty($artcontentUrl)) {
$artcontentUrl = "";
}
if ($artcontentUrl == "") {
$artcontentUrl = $cfg_mainsite . $cfg_cmspath . "/book/show-photo.php?id={$arcID}&bookid={$bookid}&chapterid={$chapterid}";
}
require_once DEDEROOT . '/book/include/story.view.class.php';
$bv = new BookView($bookid, 'book');
示例2: DedeSql
}
}
$itemconfig .= "
{/dede:art}
";
$inQuery = "
Update #@__conote set gathername='$notename',language='$language',arcsource='$arcsource',noteinfo='$itemconfig'
Where nid='$nid';
";
$dsql = new DedeSql(false);
if($dsql->ExecuteNoneQuery($inQuery))
{
$dsql->Close();
ShowMsg("成功更改一個節點!","co_main.php");
exit();
}
else
{
$gerr = $dsql->GetError();
$dsql->Close();
header("Content-Type: text/html; charset={$cfg_ver_lang}");
echo "SQL語句:<xmp>$inQuery</xmp>";
echo "<hr>錯誤提示:".$gerr."<hr>";
$dsql->Close();
ShowMsg("更改節點失敗,請檢查原因!","javascript:;");
exit();
}
ClearAllLink();
?>
示例3: BookView
click='$click',
freenum='$freenum',
bookname='$bookname',
author='$author',
litpic='$litpic',
pubdate='$pubdate',
description='$description',
body='$body',
keywords='$keywords',
status='$status',
ischeck='$ischeck'
where id='$bookid' ";
if(!$dsql->ExecuteNoneQuery($upQuery)){
ShowMsg("更新數據庫時出錯,請檢查!".$dsql->GetError(),"-1");
$dsql->Close();
exit();
}
$dsql->Close();
//生成HTML
//---------------------------------
require_once(dirname(__FILE__).'/../../include/inc_arcbook_view.php');
$bv = new BookView($bookid,'book');
$artUrl = $bv->MakeHtml();
$bv->Close();
//---------------------------------
示例4: ExecTime
if(ereg("[^0-9]",$k)){ echo "<font color='red'>{$k}:</font>{$v}<br/>\r\n"; }
}
}
$t2 = ExecTime();
echo "<hr>執行時間:".($t2-$t1);
exit();
}
if($querytype==2){
//普通的SQL語句
$sqlquery = str_replace("\r","",$sqlquery);
$sqls = split(";[ \t]{0,}\n",$sqlquery);
$nerrCode = ""; $i=0;
foreach($sqls as $q){
$q = trim($q); if($q==""){ continue; }
$dsql->ExecuteNoneQuery($q);
$errCode = trim($dsql->GetError());
if($errCode=="") $i++;
else $nerrCode .= "執行: <font color='blue'>$q</font> 出錯,錯誤提示:<font color='red'>".$errCode."</font><br>";
}
echo "成功執行{$i}個SQL語句!<br><br>";
echo $nerrCode;
}else{
$dsql->ExecuteNoneQuery($sqlquery);
$nerrCode = trim($dsql->GetError());
echo "成功執行1個SQL語句!<br><br>";
echo $nerrCode;
}
$dsql->Close();
$t2 = ExecTime();
echo "<hr>執行時間:".($t2-$t1);
exit();
示例5: __getfields
$dsql->SetSource($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd,$dbname,'');
$dsql->Open(false);
}
else if($dbptype==3){
$dsql = new DedeSql(false,false);
$dsql->SetSource($dbhost,$dbuser,$dbpwd,$dbname,'');
$dsql->Open(false);
}
if(!$dsql->linkID){
echo "<font color='red'>連接數據庫失敗!</font><br>";
echo $qbutton;
exit();
}
$dsql->SetQuery("Show Tables");
$dsql->Execute('t');
if($dsql->GetError()!=""){
echo "<font color='red'>找不到你所指定的數據庫! $dbname</font><br>";
echo $qbutton;
}
echo "<select name='exptable' id='exptable' size='10' style='width:60%' onchange='ShowFields()'>\r\n";
while($row = $dsql->GetArray('t')){
echo "<option value='{$row[0]}'>{$row[0]}</option>\r\n";
}
echo "</select>\r\n";
$dsql->Close();
exit();
}
/*-------------------------------
//列出數據庫表裏的字段
function __getfields()
--------------------------------*/
示例6: count
$adminID = $cuserLogin->getUserID();
//本章最後一個小說的排列順次序
$lrow = $dsql->GetOne("Select sortid From #@__story_content where bookid='$bookid' And chapterid='$chapterid' order by sortid desc");
if(empty($lrow)) $sortid = 1;
else $sortid = $lrow['sortid']+1;
//----------------------------------
$inQuery = "
INSERT INTO `#@__story_content`(`title`,`bookname`,`chapterid`,`catid`,`bcatid`,`bookid`,`booktype`,`sortid`,
`memberid`,`bigpic`,`body`,`addtime`,`adminid` )
VALUES ('$title','$bookname', '$chapterid', '$catid','$bcatid', '$bookid','$booktype','$sortid', '0', '' , '', '$addtime','$adminID');";
if(!$dsql->ExecuteNoneQuery($inQuery)){
ShowMsg("把數據保存到數據庫時出錯,請檢查!".$dsql->GetError().$inQuery,"-1");
$dsql->Close();
exit();
}
$arcID = $dsql->GetLastID();
WriteBookText($arcID,stripslashes($body));
//更新圖書的內容數
$row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '$bookid' ");
$dsql->ExecuteNoneQuery("Update #@__story_books set postnum='{$row['dd']}',lastpost='".time()."' where id='$bookid' ");
//更新章節的內容數
$row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '$bookid' And chapterid='$chapterid' ");
$dsql->ExecuteNoneQuery("Update #@__story_chapter set postnum='{$row['dd']}' where id='$chapterid' ");
示例7: __GetTemplets
if($copytemplet==1){
$tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style;
@copy("{$tmpletdir}/article_{$nid}.htm","{$tmpletdir}/article_{$newnid}.htm");
@copy("{$tmpletdir}/list_{$nid}.htm","{$tmpletdir}/list_{$newnid}.htm");
@copy("{$tmpletdir}/index_{$nid}.htm","{$tmpletdir}/index_{$newnid}.htm");
}
$rs = $dsql->ExecuteNoneQuery($inquery);
if($rs)
{
ShowMsg("成功複製模型,現轉到詳細參數頁... ","mychannel_edit.php?ID={$newid}&dopost=edit");
$dsql->Close();
exit();
}
else
{
$errv = $dsql->GetError();
ShowMsg("係統出錯,請把錯誤代碼發送到官方論壇,以檢查原因!<br /> 錯誤代碼:mychannel_edit.php?dopost=savecopy $errv","javascript:;");
$dsql->Close();
exit();
}
}
/*----------------
function __GetTemplets()
-----------------*/
else if($dopost=="gettemplets")
{
$dsql = new DedeSql(-100);
$row = $dsql->GetOne("Select * From #@__channeltype where ID='$ID'");
$dsql->Close();
$wintitle = "頻道管理-查看模板";
$wecome_info = "<a href='mychannel_main.php'>頻道管理</a>:查看模板";
示例8: VALUES
$dsql->Close();
exit;
}
$pname = $row['pname'];
$price = $row['money'];
}
}
if ($product == 'card') {
$okptype = $ptype . ' : 未獲得卡號';
} else {
$okptype = $ptype;
}
//保存定單信息
$inquery = "\n INSERT INTO #@__member_operation(`buyid` , `pname` , `product` , `money` , `mtime` , `pid` , `mid` , `sta` ,`oldinfo`) \n VALUES ('{$buyid}', '{$pname}', '{$product}' , '{$price}' , '{$mtime}' , '{$pid}' , '{$mid}' , '0' , '{$ptype}');\n";
$isok = $dsql->ExecuteNoneQuery($inquery);
if (!$isok) {
echo "數據庫出錯,請重新嘗試!" . $dsql->GetError();
$dsql->Close();
exit;
}
if ($price == '') {
echo "無法識別你的訂單!";
$dsql->Close();
exit;
}
$pagePos = 'post_to_pay';
if (empty($cfg_online_type)) {
$cfg_online_type = 'none';
}
require_once dirname(__FILE__) . '/config_pay_' . $cfg_online_type . '.php';
require_once dirname(__FILE__) . '/templets/buy_action_' . $cfg_online_type . '.htm';