i have the following code
<?php
$id = $_SESSION["user_session"];
$get = mysql_query("SELECT * FROM table WHERE id='$id'");
$total_found = mysql_num_rows($get);
if($total_found==0){
my code goes here
}else{
while($g = mysql_fetch_array($get)){
$id_2 = $g["id"];
$query = mysql_query("SELECT * FROM table WHERE id != '$id' AND id!='$id_2'");
while($z = mysql_fetch_array($query)){
mycode goes here
}
}
?>
but it is not working.........!! please let me know..........how can i implent double loop............becuse the above code is fetching only on id from first loop...........!! how can i do that.........!!