Null records
Posted: Sat Jul 14, 2007 6:27 pm
I have setup a file to get info from an Auction site I have, I want to show the latest items added (that have a pic).
The problem is I cannot for the life of me work out how to ignore a record that has a null record in the images coloum.
Any help would be greatly appreciated.
The problem is I cannot for the life of me work out how to ignore a record that has a null record in the images coloum.
Code: Select all
<?php require_once('public_html/Connections/auction.php'); ?>
<?php
$maxRows_Recordset1 = 3;
$pageNum_Recordset1 = 0;
if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_auction, $auction);
$query_Recordset1 = "SELECT * FROM PHPAUCTIONXL_auctions";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $auction) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>