Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Covert Function Query from Mysql to Mysqli

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 505
    Answer it

    can you please help to convert the outdated function query into mysqli

     

        function query($querystring)
            {
                    $this->querytext = $querystring;
                    $this->query_id = mysql_query($this->querytext, $this->conn);
                    $this->errno = erroInfo($this->conn);
                    $this->error = mysql_error($this->conn);
                    if($this->query_id) 
                    {
                             if(strtolower(substr(trim($this->querytext),0,6)) == 'select'){
                            $this->rows = mysqli_result::$num_rows($this->query_id);
                       } else {
                            $this->rows = 0;
               }
                            $this->row = 0;
                    } else {
                            $this->rows = 0;
                            $this->row = 0;
                            $this->halt("Query failed!");
                    }
            }
    }

 1 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: