database problem?
| From: | christian dot donhofer at chello dot at | Date: | Sun, 02 Dec 2001 08:57:12 +0000 |
| Subject: | database problem? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76339@lists.php.net to get a copy of this message | ||
hi all!
i have the following problem:
1.im loading 5 colums from a mysql-table into an array:
$threads = db_query("SELECT title, date, body, poster, board_posts_ID FROM board_posts WHERE
msgkind = 'thr'
ORDER BY date DESC");
everything fine so far...
2.im trying to list them line by line:
while (list ($title, $date, $body, $poster, $msgID) = mysql_fetch_array($threads)){
print (" <tr>\n".
" <td><a href=\"view_thread.php&parent=".$msgID.
" \">$title</a></td>\n".
" <td>$poster</td>\n".
" <td>$date</td>\n".
" </tr>\n");
}
here is the problem:
there's always one line(row) missing (i.e. if there are 17 rows in the db, 16 are being
displayed in the browser).i've tried the same code with mysql_fetch_row()...no difference in
the outcome.
please reply to this msg if you can help,
thx in advance, Chris