I have a table in a database that has multiple fields with an ID. I want to fetch all rows with ID=1 (for example ID=1 has 3 rows in the table). I have written a query to fetch the rows with ID=1 from the db, but this query only fetches the first row. I want to fetch all rows of the ID=1.
How i can fetch all rows of ID=1?
My PHP Code:
 $conn = mysqli_connect('localhost', 'root', '', 'win');
 $query = "SELECT * FROM lights WHERE id='1'";
 $result = mysqli_query($conn, $query);
 $row = mysqli_fetch_assoc($result);
 print_r($row);
?>```
