The only way I could think of to do it is to query a query in a way.
First I use a form submiting php to change a database called feature which will store the ID numbers for the rows I want displayed:
mysql_query("TRUNCATE TABLE feature");
mysql_query("INSERT INTO feature (number1) values ('$id1')");
mysql_query("INSERT INTO feature (number2) values ('$id2')");
mysql_query("INSERT INTO feature (number3) values ('$id3')");
mysql_query("INSERT INTO feature (number4) values ('$id4')");
mysql_close();
Then on my index, I run a query to select these ID numbers:
$sql = "SELECT * FROM feature WHERE number1 LIMIT 1";
$resultnew = mysql_query($sql);
list($number1) = mysql_fetch_row($resultnew);
Then I try to use the results of the first query as a variable for the second but it does not work:
$sql = "SELECT * FROM main WHERE id=$resultnew LIMIT 1";
$result = mysql_query($sql);
list($id, $description, $price, $picture) = mysql_fetch_row($result);
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
I know this is not the real way to do something like this, I just can't find a better one.