PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE Signage (RecordID int, SignageName varchar(20), DisplayOrder int, SignageImageName varchar(20)); INSERT INTO Signage (RecordID, SignageName, DisplayOrder, SignageImageName) VALUES (3, 'Test 3', 3, 'test3.png'), (1, 'Test 1', 1, 'test1.png'), (2, 'Test 2', 2, 'test2.png'); SELECT * FROM Signage; SELECT RecordID, SignageName, DisplayOrder, SignageImageName FROM Signage ORDER BY DisplayOrder ASC
Copy Clear
Copy Format Clear
<?php $query_fb = " SELECT RecordID, SignageName, DisplayOrder, SignageImageName FROM Signage ORDER BY DisplayOrder ASC "; fb = mysqli_query($mysqli, $query_fb); $ImagePath = "apps/images/"; if (mysqli_num_rows($fb) > 0) { while ($row = mysqli_fetch_assoc($fb)) { ?> <img src="/<?=$ImagePath . $row['SignageImageName']?>" /> <?php } }
Show:  
Copy Clear