can someone help me with the code?
Posted: Fri Dec 05, 2003 3:22 pm
i am not able to write php code yet, so can somebody help me out.......i want to basically say that if my column 'name' is null, then DONT show me the record.
i dont know if the "if statement" is the right one but i know that the $forum is the right table
Code: Select all
<?php
mysql_select_db($database_cnpa, $cnpa);
$query_forum = "SELECT * FROM forum ORDER BY `date` DESC";
$query_limit_forum = sprintf("%s LIMIT %d, %d", $query_forum, $startRow_forum, $maxRows_forum);
$forum = mysql_query($query_limit_forum, $cnpa) or die(mysql_error());
$row_forum = mysql_fetch_assoc($forum);
if (isset($HTTP_GET_VARS['totalRows_forum'])) {
$totalRows_forum = $HTTP_GET_VARS['totalRows_forum'];
} else {
$all_forum = mysql_query($query_forum);
$totalRows_forum = mysql_num_rows($all_forum);
}
?>