[Solved] How I Can Use Multi Table for While my data in php? [closed]


Here is a query writen to get all rows from your table.

 //connect to database  
$dbhost="localhost";  
$dbuser="root";
$dbpass="";  
$dbname="databasename";
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $conn) or die ('connection problem');

$html="";
$sql = "" .
" SELECT * FROM customer, sell, control " .
"";

$data = mysql_query($sql);
if (mysql_num_rows($data) > 0) {
    $html .= '' .
        '<table>' .
        '';
    while($row = mysql_fetch_assoc($data)) {
        $html .= '' .
            '<tr>' .
                '<td>' .
                    '' . //data using tds in table.
                '</td>' .
            '</tr>' . 
        '';
    } //END WHILE
    $html .= '' .
        '</table>' .
        '';
}
echo $html;

and that will select all your data inside all your tables in a single query, look through them with the while loop (you should change how the table looks and number of tds) and when its done, it will echo it all out.

good luck. =)

1

solved How I Can Use Multi Table for While my data in php? [closed]