读书人

运用Zend_Db_Adapter操作数据库

发布时间: 2013-07-16 22:38:05 作者: rapoo

使用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")' (一个逗号分隔的字符串)?>

?

读书人网 >其他数据库

热点推荐