Im passing a variable called $CategoryID to this page and running a query to pull all records where this value matches a record called 'intProdGroupID'. The value is getting passed but I am getting no results and im not sure exactly why. Any help is greatly appreciated.
<?php require_once('Connections/todaysmotherSQL.php'); ?>
<?php
mysql_select_db($database_todaysmother, $todaysmother);
$query_SearchResults = "SELECT intProdID, varProdName, varProdDesc, varProdImage, varProdPrice, intProdGroupID FROM Products WHERE intProdGroupID = '$CategoryID'";
$SearchResults = mysql_query($query_SearchResults, $todaysmother) or die(mysql_error());
$row_SearchResults = mysql_fetch_assoc($SearchResults);
$totalRows_SearchResults = mysql_num_rows($SearchResults);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Results:<br>
passed: <?php print("$searchParam - $CategoryID"
; ?>
<?php echo $row_SearchResults['varProdName']; ?>
<?
while(list($varProdName) = mysql_fetch_row($SearchResults)){
echo "$varProdName</BR>";
}
?>
</body>
</html>
<?php
mysql_free_result($SearchResults);
?>
<?php require_once('Connections/todaysmotherSQL.php'); ?>
<?php
mysql_select_db($database_todaysmother, $todaysmother);
$query_SearchResults = "SELECT intProdID, varProdName, varProdDesc, varProdImage, varProdPrice, intProdGroupID FROM Products WHERE intProdGroupID = '$CategoryID'";
$SearchResults = mysql_query($query_SearchResults, $todaysmother) or die(mysql_error());
$row_SearchResults = mysql_fetch_assoc($SearchResults);
$totalRows_SearchResults = mysql_num_rows($SearchResults);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Results:<br>
passed: <?php print("$searchParam - $CategoryID"

<?php echo $row_SearchResults['varProdName']; ?>
<?
while(list($varProdName) = mysql_fetch_row($SearchResults)){
echo "$varProdName</BR>";
}
?>
</body>
</html>
<?php
mysql_free_result($SearchResults);
?>