Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

Mysql Select Query

by
Category:mysql
php mysql laravel
Mysql Select Query

The SELECT statement is used to select data from one or more tables.

The SQL SELECT command is used to fetch data from the MySQL database.

First you can need database connection in php

Code

<table>
  <thead>
    <tr>
      <th>Email</th>
      <th>Password</th>
      <th>Mobile</th>
      <th>Date</th>
    </tr>
  </thead>

  <tbody>
      <?php
      $sql = "SELECT * FROM users "; 
      $result = mysqli_query($con,$sql);
      while($row = mysqli_fetch_assoc($result))
      {
      ?>
      <tr>
            <td><?=$row['email']?></td>
            <td><?=$row['password']?></td>
            <td><?=$row['mobile']?></td>
            <td><?=$row['create_date']?></td>
      </tr>
    <?php
      }
    ?>
  </tbody>
</table>

0 Comments


Html code work in comment box


Related Post