• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SqlHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中SqlHelper的典型用法代码示例。如果您正苦于以下问题:PHP SqlHelper类的具体用法?PHP SqlHelper怎么用?PHP SqlHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了SqlHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: recordFail

function recordFail($xml)
{
    $sql = "INSERT INTO tbl_rp_fail(return_code, return_msg, result_code,err_code,err_code_des,mch_billno,mch_id,wxappid,re_openid,total_amount)VALUES(\r\n'{$xml->return_code}','{$xml->return_msg}','{$xml->result_code}','{$xml->err_code}','{$xml->err_code_des}','{$xml->mch_billno}','{$xml->mch_id}','{$xml->wxappid}','{$xml->re_openid}',{$xml->total_amount}\r\n);";
    $sh = new SqlHelper();
    $sh->connDataBase(DB_WX_URL, DB_WX_USER, DB_WX_PWD, DB_WX_NAME);
    return $sh->modify($sql);
}
开发者ID:jinglikeblue,项目名称:jyhd,代码行数:7,代码来源:test_xml.php


示例2: addMessage

function addMessage($sender,$getter,$con) {
//创建SQL语句
$sql="insert into messages (sender,getter,content,sendTime) values('$sender','$getter','$con',now())";
file_put_contents("/Library/WebServer/Documents/ajax/mylog.txt",$sql."\r", FILE_APPEND);
$sqlHelper=new SqlHelper();
 return $sqlHelper->execute_dml($sql);
}
开发者ID:huang303513,项目名称:WebDevelopStudy,代码行数:7,代码来源:MessageService.class.php


示例3: ChangePassword

 public function ChangePassword($username, $oldPassword, $newPassword)
 {
     $result = false;
     $sql = "select password from t_admin where username='{$username}'";
     //创建一个SqlHelper对象
     $sqlHelper = new SqlHelper();
     $res = $sqlHelper->execute_dql($sql);
     if ($row = mysql_fetch_assoc($res)) {
         //比对密码
         if (md5($oldPassword) == $row['password']) {
             $sql = "update t_admin set password='" . md5($newPassword) . "' where username='{$username}'";
             if ($sqlHelper->execute_dml($sql) != 0) {
                 $result = true;
             } else {
                 $this->errMessage = "更新失败!";
             }
         } else {
             $this->errMessage = "原始密码不正确";
         }
     }
     //资源
     mysql_free_result($res);
     //关闭链接
     $sqlHelper->close_connect();
     return $result;
 }
开发者ID:otkinlife,项目名称:MyPhalcon,代码行数:26,代码来源:AdminService.class.php


示例4: showMessageByPage

 public function showMessageByPage($fenyePage, $loginname)
 {
     $sql = "select *from message where getter = '" . $loginname . "'" . "limit " . $fenyePage->pageSize * ($fenyePage->page - 1) . "," . $fenyePage->pageSize;
     $sqlHelper = new SqlHelper();
     $res = $sqlHelper->execute_dql2($sql);
     return $res;
 }
开发者ID:JimChenAnother,项目名称:notebook,代码行数:7,代码来源:messageModel.class.php


示例5: get_reply

 public function get_reply($bbs_id)
 {
     $sqlHelper = new SqlHelper();
     $sql = "select * from reply where bbs_id={$bbs_id}";
     $res = $sqlHelper->res_array_erwei($sql);
     $sqlHelper->close();
     return $res;
 }
开发者ID:justfu,项目名称:Microclass1.0,代码行数:8,代码来源:bbs.class.php


示例6: get_user_info

 public function get_user_info($sno)
 {
     $sqlHelper = new SqlHelper();
     $sql = "select sno,usernc,truename,email,tel,major,img from student where sno='{$sno}'";
     $res = $sqlHelper->res_array($sql);
     $sqlHelper->close();
     return $res;
 }
开发者ID:justfu,项目名称:Microclass1.0,代码行数:8,代码来源:student.class.php


示例7: updateEmpUI

 public function updateEmpUI($id, $name, $grade, $email)
 {
     $sql = "update emp set name='{$name}',grade={$grade},email='{$email}' where id={$id}";
     $sqlHelper = new SqlHelper();
     $res = $sqlHelper->execute_dml($sql);
     $sqlHelper->close_connect();
     return $res;
 }
开发者ID:jimmyZRone,项目名称:test-ssh-key,代码行数:8,代码来源:empService.class.php


示例8: getStuListByPage

 public function getStuListByPage($pageNow, $pageSize)
 {
     $sql = "select * from student limit " . ($pageNow - 1) * $pageSize . ",{$pageSize}";
     $sqlHelper = new SqlHelper();
     $res2 = $sqlHelper->execute_dql2($sql);
     //free
     return $res2;
 }
开发者ID:EricWenyi,项目名称:Member-Management-System,代码行数:8,代码来源:StuService.class.php


示例9: get_question_gaicuo

 public function get_question_gaicuo($paper_id)
 {
     $sqlHelper = new SqlHelper();
     $sql = "select correct_name,correct_code,true_code from correct where paper_id='{$paper_id}'";
     $arr = $sqlHelper->res_array_erwei($sql);
     $sqlHelper->close();
     return $arr;
 }
开发者ID:justfu,项目名称:Microclass1.0,代码行数:8,代码来源:selectService.class.php


示例10: update

 private function update($gameId, $player_name)
 {
     $st = new SqlHelper();
     $sql = "UPDATE tbl_player SET player_name='{$player_name}',last_login_utc=UNIX_TIMESTAMP(NOW()), last_login_date = NOW() WHERE game_id={$gameId}";
     $st->conn();
     $result = $st->modify($sql);
     $st->close();
     return $result;
 }
开发者ID:jinglikeblue,项目名称:game_server_framework,代码行数:9,代码来源:user.php


示例11: insert_correct_question

 public function insert_correct_question($correct_name, $correct_code, $true_code, $run_answer, $paper_id)
 {
     $sqlHelper = new SqlHelper();
     $correct_code = str_replace("<", "\"", $correct_code);
     $correct_code = str_replace(">", "\"", $correct_code);
     $sql = "INSERT INTO `weike`.`correct` ( `correct_name`, `correct_code`, `true_code`, `run_answer`, `paper_id`) VALUES ( '{$correct_name}', '{$correct_code}', '{$true_code}', '{$run_answer}', '{$paper_id}')";
     $res = $sqlHelper->dml($sql);
     return $res;
 }
开发者ID:justfu,项目名称:Microclass1.0,代码行数:9,代码来源:question.class.php


示例12: record2DB

 private function record2DB($openid, $qList)
 {
     $sql = "INSERT INTO tbl_feedback VALUES('{$openid}',NOW(),'{$qList['0']}','{$qList['1']}','{$qList['2']}','{$qList['3']}','{$qList['4']}','{$qList['5']}','{$qList['6']}','{$qList['7']}');";
     $st = new SqlHelper();
     $st->conn();
     $result = $st->modify($sql);
     $st->close();
     return $result;
 }
开发者ID:jinglikeblue,项目名称:jyhd,代码行数:9,代码来源:feedback.php


示例13: getId

 public function getId($tel)
 {
     $sqlHelper = new SqlHelper();
     $user = new User();
     $sql = "select id from user where tel='{$tel}'";
     $res = $sqlHelper->dql_arr($sql);
     $user->setId($res[0]['id']);
     return $user;
 }
开发者ID:justfu,项目名称:lavender,代码行数:9,代码来源:UserService.class.php


示例14: record2DB

 private function record2DB($openid, $key)
 {
     $sql = "UPDATE tbl_rbkey SET openid='{$openid}',used_date=NOW()  WHERE rb_key ='{$key}' AND openid IS NULL;";
     $st = new SqlHelper();
     $st->connDataBase(DB_URL, DB_USER, DB_PWD, DB_RBKEY);
     $result = $st->modify($sql);
     $st->close();
     return $result;
 }
开发者ID:jinglikeblue,项目名称:jyhd,代码行数:9,代码来源:rbkey.php


示例15: getFenyePage

 /**
  * @param $fenyePage
  */
 function getFenyePage($fenyePage)
 {
     $sqlhelper = new SqlHelper();
     $sql1 = "select * from emp limit " . ($fenyePage->pageNow - 1) * $fenyePage->pageSize . "," . $fenyePage->pageSize;
     echo "当前页:" . $fenyePage->pageNow . "<br/>";
     echo $sql1;
     $sql2 = "select count(id) from emp";
     $sqlhelper->exectue_dql_fenye($sql1, $sql2, $fenyePage);
     $sqlhelper->close_conn();
 }
开发者ID:blackjack0922,项目名称:empManage,代码行数:13,代码来源:EmpService.class.php


示例16: CheckAdmin

 public function CheckAdmin($id, $password)
 {
     $sqlHelper = new SqlHelper();
     $sql = "select password,name from admin where id={$id}";
     $res = $sqlHelper->res_array($sql);
     if (md5($password) == $res[0]) {
         return $res[1];
         exit;
     }
     $sqlHelper->close();
     return "";
 }
开发者ID:justfu,项目名称:Microclass1.0,代码行数:12,代码来源:AdminSevice.class.php


示例17: checkAdmin

 public function checkAdmin($id, $password)
 {
     $sql = "select password,name from admin where id={$id}";
     $sqlhelper = new SqlHelper();
     $res = $sqlhelper->execute_dql($sql);
     if ($row = mysqli_fetch_assoc($res)) {
         if (md5($password) == $row['password']) {
             return true;
         }
     }
     mysqli_free_result($res);
     $sqlhelper->close_conn();
     return false;
 }
开发者ID:blackjack0922,项目名称:empManage,代码行数:14,代码来源:AdminService.class.php


示例18: AdminLogin

 public function AdminLogin($username, $password)
 {
     $sqlHelper = new SqlHelper();
     $admin = new Admin();
     $sql = "select password,level from admin where username='{$username}'";
     $res = $sqlHelper->dql_arr($sql);
     if ($res[0]['password'] == md5($password)) {
         $admin->setUsername($username);
         $admin->setLevel($res[0]['level']);
         return $admin;
     } else {
         return null;
     }
 }
开发者ID:justfu,项目名称:lavender,代码行数:14,代码来源:AdminService.class.php


示例19: getPageCount

 function getPageCount($pageSize)
 {
     //查询rowcout
     $sql = "select count(id) from brand_wyeth_customer";
     $sqlhelper = new SqlHelper();
     $res = $sqlhelper->execute_dql($sql);
     //计算pagecount
     if ($row = mysql_fetch_row()) {
         $pagecount = ceil($row[0] / $pageSize);
     }
     //释放资源关闭链接
     mysql_free_result($res);
     mysql_close();
     return $pagecount;
 }
开发者ID:chijie,项目名称:emp,代码行数:15,代码来源:EmpService.php


示例20: getOrderId

/**
 * 生成商户订单号
 * @param $openid
 */
function getOrderId($mchBillno)
{
    $temp = $mchBillno . date("Ymd");
    $sql = "SELECT COUNT(*) AS count FROM tbl_rp_success";
    $st = new SqlHelper();
    $st->connDataBase(DB_WX_URL, DB_WX_USER, DB_WX_PWD, DB_WX_NAME);
    $result = $st->query($sql);
    $id = $result[0]['count'];
    $count = strlen($id);
    for ($i = $count; $i < 10; $i++) {
        $temp .= '0';
    }
    $temp .= $id;
    return $temp;
}
开发者ID:jinglikeblue,项目名称:jyhd,代码行数:19,代码来源:date.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SqlParser类代码示例发布时间:2022-05-23
下一篇:
PHP SqlFormatter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap