Welcome Guest, Not a member yet? Register   Sign In
loop problem
#1

[eluser]Bigil Michael[/eluser]
i want to execute multiple while loop

like this

Code:
<?php $selected_ member = "select id,name from members"
$result_search = $db->query($selected_ member);
while(list($id,$name) = $db->fetch_array($result_search))
{
     $search_query = "select id,name from members"
     $result_s = $db->query($search_query);
     while(list($id,$name) = $db->fetch_array($result_s))
    {
      echo $name;
    }
}

my table contains 5 entries
so it must print 25 rows

it prints 5 rows only once
that means the loop execute only once.
i dont know what is the problem here ??????
can anyone help me????


Messages In This Thread
loop problem - by El Forum - 06-17-2011, 06:40 AM
loop problem - by El Forum - 06-17-2011, 08:33 AM
loop problem - by El Forum - 06-17-2011, 01:15 PM
loop problem - by El Forum - 06-17-2011, 01:29 PM
loop problem - by El Forum - 06-17-2011, 01:39 PM
loop problem - by El Forum - 06-17-2011, 01:52 PM
loop problem - by El Forum - 06-17-2011, 02:02 PM
loop problem - by El Forum - 06-17-2011, 06:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB