Repeating Tables Not Showing any data
I have created my recordset successfully.
I have created my repeating table successfully.
But I could never get any information to show up. When I tested my recordset I could see all the data. I have no idea what's going on.
<?php require_once('Connections/pawtabs_db.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_pawtabs = 36;
$pageNum_pawtabs = 0;
if (isset($_GET['pageNum_pawtabs'])) {
$pageNum_pawtabs = $_GET['pageNum_pawtabs'];
}
$startRow_pawtabs = $pageNum_pawtabs * $maxRows_pawtabs;
$colname_pawtabs = "-1";
if (isset($_SESSION['UserID'])) {
$colname_pawtabs = (get_magic_quotes_gpc()) ? $_SESSION['UserID'] : addslashes($_SESSION['UserID']);
}
mysql_select_db($database_pawtabs_db, $pawtabs_db);
$query_pawtabs = sprintf("SELECT * FROM paws WHERE UsersId = %s", GetSQLValueString($colname_pawtabs, "int"));
$query_limit_pawtabs = sprintf("%s LIMIT %d, %d", $query_pawtabs, $startRow_pawtabs, $maxRows_pawtabs);
$pawtabs = mysql_query($query_limit_pawtabs, $pawtabs_db) or die(mysql_error());
$row_pawtabs = mysql_fetch_assoc($pawtabs);
if (isset($_GET['totalRows_pawtabs'])) {
$totalRows_pawtabs = $_GET['totalRows_pawtabs'];
} else {
$all_pawtabs = mysql_query($query_pawtabs);
$totalRows_pawtabs = mysql_num_rows($all_pawtabs);
}
$totalPages_pawtabs = ceil($totalRows_pawtabs/$maxRows_pawtabs)-1;
?>
<?php
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "3";
?>
<head></head>
<body>
<table>
<?php do { ?>
<tr>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_pawtabs){
?>
<td> </td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td> </td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_pawtabs && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_pawtabs = mysql_fetch_assoc($pawtabs);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</tr>
<?php } while ($row_pawtabs = mysql_fetch_assoc($pawtabs)); ?>
</table>
</body>
<?php
mysql_free_result($pawtabs);
?>