How can I get the output of records from the database in the sequence in which the id records are transferred (my records are constantly output sequentially 1 - 5).
$connect= mysql_connect("localhost", "testing", "testing"); $select = mysql_select_db("testing", $connect); mysql_query("SET NAMES utf8"); $id = "5,2,1,4,3"; $result = mysql_query("SELECT * FROM products WHERE id IN ($id)"); while ($data = mysql_fetch_row($result)) { echo "<H1>$data[0] ........."; echo "$data[2]<br></H1>"; }