while not working
Posted: Sat Sep 05, 2009 2:20 am
Hi
I have a while loop for displaying database rows
It works in all servers but not in one of the servers (that we need)
No data is displayed. database connection is ok just while loops are not working on that host
How can I fix it if I don't want to change host?
This is the code:
also tried
I have a while loop for displaying database rows
It works in all servers but not in one of the servers (that we need)
No data is displayed. database connection is ok just while loops are not working on that host
How can I fix it if I don't want to change host?
This is the code:
Code: Select all
while($row=mysql_fetch_object($rows)){
$id=$row->id;
$name=$row->rname;
$location=$row->rloc;
$date=rdate($row->date,'');
$link="../interview.php?id=".$id;
$name="<a href='$link'>$name</a>";
$dellink="interview.php?view=all&delete=".$id;
$delete="<a href='$dellink'>Delete</a>";
$editlink="editinterview.php?edit=".$id;
$edit="<a href='$editlink'>Edit</a>";
echo "<tr><td><b> $name </b></td><td>$location </td><td>$date </td><td>$edit </td><td>$delete </td></tr>";
}
Code: Select all
while($row=mysql_fetch_assoc($rows)){
$id=$row['id'];
$name=$row['rname'];
$location=$row['rloc'];
$date=rdate($row['date'],'');
$link="../interview.php?id=".$id;
$name="<a href='$link'>$name</a>";
$dellink="interview.php?view=all&delete=".$id;
$delete="<a href='$dellink'>Delete</a>";
$editlink="editinterview.php?edit=".$id;
$edit="<a href='$editlink'>Edit</a>";
echo "<tr><td><b> $name </b></td><td>$location </td><td>$date </td><td>$edit </td><td>$delete </td></tr>";
}