Web Analytics Made Easy -
StatCounter looping <tables> and database - CodingForum

Announcement

Collapse
No announcement yet.

looping <tables> and database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • looping <tables> and database

    to all,
    i tried looping tables....but i only have one record shown.i don't now what's wrong...here's the code:

    PHP Code:
    <? do{ ?>
            <table width="90%" border="0" cellspacing="1" cellpadding="0">
              <tr>
                <td width="5%" align=center class=news><? echo ($no);?></td>
                <td width="7%" align=center class=news>
                <? for ($i=0$i count("$row->user_active"); $i++){
    echo (
    "<input type=\"checkbox\" name=\"chkDelete[$i]\" value=\"chkDelete\">"); }   ?>
    </td>
    <td width="23%" align=center class=news><? echo ("$row->username");?></td>

    <td width="33%" align=center class=news><? echo ("$row->user_email");?></td>

    <td width="32%" align=center class=news><? echo ("$row->user_Contact");?></td>
              </tr>
            </table>
    <? } while (!$row=mysql_fetch_object($rs));?>
    oh...i am looping the database where the field user_active = 0.i hope anyone can help.thanks.
    Warm Regards,
    Mivec

  • #2
    should
    PHP Code:
    <? } while (!$row=mysql_fetch_object($rs));?>
    be

    PHP Code:
    <? } while ($row=mysql_fetch_object($rs));?>

    Comment

    Working...
    X