i am creating a navigation list(Categories + sub categories) in the left bar of my website.
Each Category has around 5-7 sub categories under them.
MOBILE PHONES <font color='"#FF0000"'>(this is category name)</font>
1) Nokia<font color='"#FF0000"'> (these below are sub categories)</font>
at present they are displayed in a general loop acording to the number they were entered.
now i want to change the "display order" of sub categories.
means I want to move
"Sony" at No. 1
"Blackberry at No.2
"Samsung" at No. 3
at present this is my query
$leftqry="select * from dealer_table where category_id=1";
while($leftrow = mysql_fetch_array($leftresult))
echo "<td>" . "<a class='leftnav' title='".$dname. "-". $cname. "' href='http://localhost/mobiles-".$leftrow['dealer_id'] . "-" .$leftrow['category_id'] ."-".$dname."-".$cname.".html". "'>» " .$leftrow['dealer_name']. "</a></td>";
what should i do
How the list should be presented? Any specific criterion?
Indeed. In order to order the data from the table in a specific order (doh) the table must have a column that contains the order criterium. So if you want to be able to change the order at will, you'll need to have a 'listorder' column and add ' ORDER BY listorder' to your query.
can me explain me a lit bit more about what kind of data should be entered in "listorder" column ?
shall i enter numeric data and then i will be updating this column to re-order my list?
There's no need to add another column if he wants to order the list based, for instance, on a number of sales criterion. That's why I asked.
there is no reason for having particular creteria for presenting.
its just that i think "Sony" is first preference for my clients and then 2nd is "Blackberry".
so i need to show "Sony" on No.1 and Blackberry at No. 2 and so on
Use the approach suggested by Guido then.