<?php

    require_once './config/database.php';
    
    $power_db = mysql_query("SELECT `U`, `I`, `P`, `Q`, `S`, `n`, `time`, `date`, `R` FROM `power`");
    
    echo "<b>Measured value: </b><br><br>";
    
    while ($power = mysql_fetch_array($power_db)) 
    {
        $U_db = $power['U'];
        $I_db = $power['I'];
        $P_db = $power['P'];
        $Q_db = $power['Q'];
        $S_db = $power['S'];
        $n_db = $power['n'];
        $time_db = $power['time'];
        $date_db = $power['date'];
        $R_db = $power['R'];
        
        echo 'U = '.$U_db.', I = '.$I_db.', P = '.$P_db.', Q = '.$Q_db.', S = '.$S_db.', ny = '.$n_db.' at '.$time_db.'h '.$date_db.' R = '.$R_db.',<br>';
    }
    
    ?>