execution sql command
<p>what the factor that the code not work?</p>

<pre><code>&lt;?php
class mysql
{
    var $user;
    var $password;
    var $database;
    var $host;
    var $out;
    var $query;

    function mysql($username, $password, $database, $host, $query)
    {
        $this-&gt;user = $username;
        $this-&gt;password = $password;
        $this-&gt;database = $database;
        $this-&gt;host = $host;
        $this-&gt;query = $query;
    }
    function connect()
    {
        $this-&gt;out = mysql_connect($this-&gt;host, $this-&gt;user, $this-&gt;password)
                or die("Error cannnot connect to mysql server");
                echo "Connected successfully to Mysql server";
        mysql_select_db($this-&gt;database) or die("Cannot select db");

    }
    function execution()
    {
        $re = mysql_query($this-&gt;query);
        while($row = mysql_fetch_array($re))
            echo $row;
    }
    function out()
    {
        mysql_close($this-&gt;out);
    }

}
$connect = new mysql('root','','test','127.0.0.1');
$connect-&gt;connect();
$connect-&gt;execution('test','SELECT * FROM test');
$connect-&gt;out;


?&gt;
</code></pre>

<p><strong>Update</strong></p>

<pre><code>$connect = new mysql('root','','test','127.0.0.1','SELECT ss from test');
</code></pre>

<p>I have trying above code and its dont return nothing..</p>

<p>ss contain an column name ID and its contain the 11 value.</p>
