首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

运用Zend_Db_Adapter操作数据库

2013-07-16 
使用Zend_Db_Adapter操作数据库?PHP代码:?php// 创建一个$db 对象,假设数据库adapter 为mysql.// 在where

使用Zend_Db_Adapter操作数据库

?PHP代码:

<?php// 创建一个$db 对象,假设数据库adapter 为mysql.// 在where 语句中为标量加上引号$where = $db->quoteInto('id = ?', 1);// $where 现在为'id = "1"' (注意两边的引号)// 在where 语句中为数组加上引号$where = $db->quoteInto('id IN(?)', array(1, 2, 3));// $where 现在为'id IN("1", "2", "3")' (一个逗号分隔的字符串)?>

?

热点排行