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


PHP DedeSql::GetError方法代码示例

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

示例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();
?>
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:co_edit_action.php

示例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();

//---------------------------------
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:story_edit_action.php

示例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();
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:sys_sql_query.php

示例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()
--------------------------------*/
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:member_data_action.php

示例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' ");
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:30,代码来源:story_add_content_action.php

示例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>:查看模板";
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:mychannel_edit.php

示例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';
开发者ID:Hacker-One,项目名称:exp,代码行数:31,代码来源:buy_action.php


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