Location: PHPKode > scripts > MySQL_data_table > mysql_data_table/mysql_data_table.class.php
    Class: mysql_data_table
    Author: Sven Zurnieden
    Email: hide@address.com
        This class is extending data_table class which generates a html-table from a dataset array.
        For info on datatable look in data_table.class.php.
        Just set the query and execute it.
        Use then the methods of data_table class to change layout from table.
    HAVE FUN NOW, hope this class is useful


class mysql_data_table extends data_table{
    var $query      = false;    //the query
    function set_query($query){
        //sets the query
        $this->query = $query;
    function execute_query($db_host, $db_user, $db_pass, $db){
        //executes the query
        $connect = mysql_connect($db_host, $db_user, $db_pass);
        $query = mysql_query($this->query, $connect);
        $i = 0;
        while($result = mysql_fetch_array($query, MYSQL_ASSOC)){
            $data[$i] = $result;
Return current item: MySQL_data_table