900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > 调用-自己写的一个php的PDO的类 有点问题 求大神指点

调用-自己写的一个php的PDO的类 有点问题 求大神指点

时间:2021-12-04 08:15:52

相关推荐

调用-自己写的一个php的PDO的类 有点问题 求大神指点

后端开发|php教程

php

调用

数据库

后端开发-php教程

php调用数据库

风云直播源码,vscode 文件跳转,ubuntu黏贴,tomcat具体安装,sqlite是否支持中文,网站播放器插件源码下载,最利于seo的前端框架,网络爬虫会中毒吗,修改php版本,seo基础培训优化,网站友情链接怎么设置,js 拖动 网页,织梦php模板lzw

自己写的一个php的PDO的类,在调用的时候可以查询,插入的时候没有报错,但是插入没有成功,这是怎么回事。。。。。。。。。。

这个是调用的类

网页psd带源码下载,vscode生成JSP代码,ubuntu 备份主机,tomcat 处理流程,sqlite连接字符串c,什么牌子的爬虫风扇好耐用,php 清空缓存,seo快照优化是什么,个人博客网站模版,网页制作手册,微信公众号活动模板下载lzw

config=$config; $this->host=$this->config["host"]; $this->dbname=$this->config["dbname"]; $this->user=$this->config["user"]; $this->pwd=$this->config["pwd"]; $this->charset=$this->config["charset"]; //$this->open(); } /** 打开数据库*/ public function open() { $this->conn=new PDO("mysql:host=".$this->host.";dbname=".$this->dbname,$this->user,$this->pwd); $this->conn->query(set names .$this->charset); } /** 增删改*/ public function execSql($sql) { $bool=$this->conn->exec($sql); if($bool>0) { return "true"; }else { return false; } } /** 查询一条数据 */ public function quer($sql,$mode=PDO::FETCH_ASSOC) { $result=$this->conn->query($sql); $result->setFetchMode($mode); $re=$result->fetch(); $result=null; return $re; } /** 查询多条数据 */ public function querMore($sql,$mode=PDO::FETCH_ASSOC) { $result=$this->conn->query($sql); $result->setFetchMode($mode); $re=$result->fetchAll(); $result=null; return $re; } /*查询指定表中有多少条记录*/ public function getTabRows($key,$tableName,$where) { $sql="select count(".$key.") as c from ".$tableName." where ".$where.""; $result=$this->conn->query($sql); $result->setFetchMode(PDO::FETCH_ASSOC); $re=$result->fetch(); $result=null; return intval($re[c]); } /*关闭数据库*/ public function closeConn() { $this->conn=null; }}?>

这个是调用的方法

p2p 返利 源码,vscode比较theia,怎么操作ubuntu虚拟机,tomcat添加linux,门禁管理平台 sqlite,ckeditor插件下载,动态生成表格前端框架,反爬虫使用xhr请求,php转盘抽奖,武陟优化seo,小苍淘宝客网站,网页动图素材下载,网页动态磁贴模板,视频强制分享视频裂变增强版程序lzw

open();$sql="INSERT INTO `test` (`name`, `nicheng`, `password`, `sex`, `icon`, `cardid`, `city`, `phone`, `qq`, `mail`, `liuyan`)VALUES ( , , , , , 1315, ttt, 598562, 79874564, ret, werterter)";echo $db->execSql($sql);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。