-
asdfasdf查看全部
-
asdfasdfasfd查看全部
-
PDO对象方法查看全部
-
f2: $sql="select * from user where username=? and password=?";//占位符 $stmt=$pdo->prepare($sql); $stmt->execute(array($username,$password));查看全部
-
$sql="select * from user where username=:username and password=:password";//占位符 $stmt=$pdo->prepare($sql); $stmt->execute(array(":username"=>$username,":password"=>$password)); PDOStatement对象方法rowCount():当前一条sql执行语句是 select的时候 返回的是查询到结果的条数 当前一条sql执行语句是 增删改的时候,返回的是受影响的行数查看全部
-
PDOStatement对象方法查看全部
-
常用方法:查看全部
-
$pdo->lastInsertId() 得到最后插入的数据ID查看全部
-
insert 和 insert into 的区别: INSERT INTO TABLE VALUES('','',...) 这种插入的格式的意思是,你表中有多少个字段,VALUES()中就必须写多少个字段,即使有的字段你不想写入数据,也必须写成(id,,,name,,)这样的格式。 NSERT TABLE (栏位1,栏位2...)VALUES ('','',...) 这种插入的格式的意思是,TABLE()中有写了多少个字段名,VALUES()中对应写入多少数据就可以了,例:TABLE(id,name) VALUES(1,smile)查看全部
-
exec()执行一条sql语句并返回其受影响的记录的--条数-- 如果没有受影响的记录,则返回0 exec()对于select没有作用查看全部
-
使用<<<的时候 最外层将不再需要引号,因为它会自动加上查看全部
-
uri形式链接数据库 uri:file//xxxxx 通过配置文件链接数据库 php.ini 任意位置设置PDO配置项 pdo.dsn.xxx(配置名称,如:imooc)="mysql:host...." 引用的时候直接 $dsn = "imooc";就行了查看全部
-
1、extension=php_pdo.dll 2、extension=php_pdo_mysql.dll查看全部
-
PDO特性:1、编码一致 2、灵活性 3、高性能 4、面向对象特性查看全部
-
通过uri方式连接查看全部
举报
0/150
提交
取消