执行一条SQL语句, 返回影响的行数
public int exequery(string $sql [, array $bind_value = array()])
SQL 语句
把一个值绑定到一个参数
返回影响的行数 大于零代表成功, false/0/NULL 代表失败
<?php $configs = array( 'dsn' => array('host' => '127.0.0.1', 'dbname' => 'test', 'port' => 6666), 'username' => 'test', 'password' => 'AbcdefRDvgedf', ); $mysql = new Asf_Db_Adapter_Mysql($configs); $mysql->setTableName('test1');
<?php $sql_exenoquery = "update user set nickname = ? where id = ?"; var_dump($mysql->exeQuery($sql_exenoquery, array('test1', 95)));