I have a simple while loop which i use to bring out 3 rows of a table
I would like to call these rows individually to my page , kind of splitting up the out put.
My current code is
$conn = mysql_connect("$glob_host", "$glob_user", "$glob_pass")
or die(mysql_error());
mysql_select_db($db_name,$conn) or die(mysql_error());
//do the sql select statement
$sql = "SELECT *
FROM special_offers_new
WHERE web_position = 1
OR web_position = 2
OR web_position = 3
LIMIT 3
";
$result = mysql_query($sql, $conn)or die(mysql_error());
//will go through each row in the result set and display data
while ($row = mysql_fetch_array($result)) {
//give a name to the fields
$section = $row['section'];
$name=$row['name'];
$offer_id = $row['offer_id'];
$description = $row['description'];
$offer_block.="$name<br>";
}
?>
Any ideas on the neatest way of pulling out say web_position 3 then somewhere else web_position 1 etc.
I dont want to run 3 seperate queries.
Thanks in advance