Advertisement
juliano_campos

Untitled

May 24th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. require 'adodb5/adodb.inc.php';
  5.  
  6.  
  7.     class conexao
  8.     {
  9.        
  10.          var $tipo_banco = "mySQLi";
  11.          var $servidor = "localhost";
  12.          var $usuario = "root";
  13.          var $senha = "252525";
  14.          var $banco;
  15.        
  16.         function conexao()
  17.         {
  18.            
  19.             $this->banco = NewADOConnection($this->tipo_banco);
  20.             $this->banco->dialect = 3;
  21.             $this->banco->debug = true;
  22.             $this->banco->Connect($this->servidor,$this->usuario,$this->senha);
  23.                
  24.         }
  25.        
  26.        
  27.     }
  28.    
  29.     $con = new conexao();
  30.    
  31.     mySQLi_select_db($con, "carrinho_campras");
  32.    
  33.     if($con)
  34.         echo "conectou";
  35.     else
  36.         echo "nao conectou";
  37.  
  38. ?>
  39. tem esse erro e ja tentei de todo o jeito queria usar o adodb ate no postgres e a mesma coisa ja procurei e nao achei nada
  40.  
  41.  
  42. PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, object given in
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement