zoukankan      html  css  js  c++  java
  • mysqli太贱了

    你以为mysql_query与mysqli_query是一样的参数吗?不,TNND恰恰是反过来的!查了好久

    	protected function query ( $sql )
    	{
    		$sql = $this->sql_printf(func_get_args());
    		if (!($res = mysqli_query($this->conn, $sql)))
    		{
    			$this->sql_errcheck($sql);
    		}
    		if (is_resource($res))
    		{
    			mysqli_free_result($res);
    		}
    	}
    

      

    	protected function query ( $sql )
    	{
    		$sql = $this->sql_printf(func_get_args());
    		if (!($res = mysql_query($sql, $this->conn)))
    		{
    			$this->sql_errcheck($sql);
    		}
    		if (is_resource($res))
    		{
    			mysql_free_result($res);
    		}
    	}
    

      此外,PHP5.3(5.2没这问题)使用mysql_connect连接mysql5.0时竟然报Auth Fail,而用mysqli_connect与PDO都正常,这TM还不知道是什么原因,难道是mysqlnd?

    躲猫猫社团团长 http://t.sina.com.cn/coolria

  • 相关阅读:
    s
    qq
    qqq
    q
    qq
    http请求报文
    qq
    q
    qqq
    java对象-String的用法
  • 原文地址:https://www.cnblogs.com/yangyh/p/2893529.html
Copyright © 2011-2022 走看看