Mysql
 sql >> Teknologi Basis Data >  >> RDS >> Mysql

Hasilkan baris tabel dengan nilai dari DB PHP

Coba:

$facSecComponentID = array();
$facSecComponent = array();
$facSecComponentType = array();
$facSecComponentThickness = array();

while ($row = mysqli_fetch_array($data)) {
    $facSecComponentID[] = $row['facility_section_components_id'];
    $facSecComponent[] = $row['roof_component_id'];
    $facSecComponentType[] = $row['roof_component_type_id'];
    $facSecComponentThickness[] = $row['component_thickness'];
}

$numItems = mysqli_num_rows($result);

for($i=0;$i<$numItems;$i++){
    echo "<tr>";
    echo "<td>{$facSecComponent[$i]}</td>";
    echo "<td>{$facSecComponentType[$i]}</td>";
    echo "<td>{$facSecComponentThickness[$i]}</td>";
    echo "</tr>";   
}


  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. cara menghapus nilai duplikat di tabel mysql

  2. Urutan MySQL berdasarkan nilai ID tertentu

  3. Android - Ruby on Rails - MySQL

  4. Bagaimana cara membandingkan string versi (x.y.z) di MySQL?

  5. Jumlahkan baris dari kondisi berbeda di Mysql