使用mysql_unbuffered_query执行增删改语句,但它不缓存结果行等数据,那要如何判断命令是否成功执行了

解决方案 »

  1.   

    mysql_affected_rows()mysql_unbuffered_query 只是不缓存 select 的结果
      

  2.   

    minimize Suggested alternativesUse of this extension is discouraged. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. 
    reject note Return ValuesFor SELECT, SHOW, DESCRIBE or EXPLAIN statements, mysql_unbuffered_query() returns a resource on success, or FALSE on error.For other type of SQL statements, UPDATE, DELETE, DROP, etc, mysql_unbuffered_query() returns TRUE on success or FALSE on error.