Ok..
lets Say this is my Sql with Some Data.
PHP Code:
CREATE TABLE `test` (
`id` int(4) NOT NULL auto_increment,
`fruit` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
INSERT INTO `test` VALUES (1, 'apple');
INSERT INTO `test` VALUES (2, 'orange');
INSERT INTO `test` VALUES (3, 'olive');
Now this the file to View the Data
PHP Code:
<?php
// Connects to your Database
mysql_connect("localhost", "root", "pass") or die(mysql_error()) ;
mysql_select_db("test") or die(mysql_error()) ;
$data = mysql_query("SELECT * FROM test ") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array( $data ))
{
Echo "<b>Name:</b> ".$info['fruit'] . "<br> ";
}
?>
this will print all
as
apple
orange
olive
i need to have icon next to each one to move the type up or down (sort) like make the olive the top and the orange the last
olive
apple
orange
that is just example , not the actual Code , But if i get the idea in how i can try apply it to my live code ..