php - $row=mysql_fetch_array and $row2=mysql_fetch_array -
i'm trying figure out way of being able use $row , $row2. how can incorporate while statement?
$result=mysql_query("select * infupdates username='$_session[username]' order date desc"); $result1=mysql_query("select * infupdates username='test' order date desc"); while ($row1=mysql_fetch_array($result1,mysql_assoc)) <td><span class="checkmark"><?php if (($row[onetie]==1)) print "✓";?></span></td> <td><span class="checkmark"><?php if (($row2[onecro]==1)) print "✓";?></span></td>
better use or
in query try
<?php $result=mysql_query("select * infupdates '".$_session['username']."' or username='test' order date desc"); while ($row=mysql_fetch_array($result,mysql_assoc)) {?> <td><span class="checkmark"><?php if (($row['onetie']==1)) print "✓";?></span></td> <td><span class="checkmark"><?php if (($row['onecro']==1)) print "✓";?></span></td> <?php }?>
also check @vutran comment
Comments
Post a Comment