Undefined variable: totalRows_ error
I used DataAssist to add a new set of management pages to my PowerStore site. When I run the results page, I get the following error:
Notice: Undefined variable: totalRows_WADAevents in C:\inetpub\wwwroot\Ellen Celli Jewelry\Admin\events.php on line 63
No records are displayed, even though there is definitely one in the database.
Here's the code for the first part of my page (line 63 is the last line of code before the closing php tag):
<?php require_once( "../WA_Globals/WA_Globals.php" ); ?>
<?php require_once('../Connections/localhost.php'); ?>
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("../WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("../WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php require_once( "../WADbSearch/HelperPHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Administrator")){
WA_Auth_RestrictAccess("index.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;
}
}
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
?>
<?php
$queryString_WADAevents = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WADAevents") == false &&
stristr($param, "totalRows_WADAevents") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WADAevents = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WADAevents = sprintf("&totalRows_WADAevents=%d%s", $totalRows_WADAevents, $queryString_WADAevents);
?>
Any ideas what could be wrong?
Best - Joe