close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Empty Results page

Thread began 10/15/2012 6:38 pm by bjgarner241692 | Last modified 11/28/2012 11:05 am by bjgarner241692 | 2597 views | 8 replies

bjgarner241692

Did it again.

This time the table has 3 fields.
prID - INT 10 Primary Auto
prCode Tinytext
prDiscount Double 4,2

Creating 3 pages. Results, Insert, Update

Table is pre-existing.
While the wizard is running, after it has created the results page it comes up and says it is about to change results page, do you want to reload the page? I picked Yes.

I have done this with several websites, using various tables with various configurations. It fails the first time EVERY time. When I rerun the wizard, it will complete.

Here is the page created:

php:
<?php require_once('../Connections/zeoconn.php'); ?>

<?php 
require_once("../webassist/database_management/wa_appbuilder_php.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
$maxRows_WADApromo 
10;
$pageNum_WADApromo 0;
if (isset(
$_GET['pageNum_WADApromo'])) {
  
$pageNum_WADApromo $_GET['pageNum_WADApromo'];
}
$startRow_WADApromo $pageNum_WADApromo $maxRows_WADApromo;

mysql_select_db($database_zeoconn$zeoconn);
$query_WADApromo "SELECT prID, prCode, prDiscount FROM promo";
$query_limit_WADApromo sprintf("%s LIMIT %d, %d"$query_WADApromo$startRow_WADApromo$maxRows_WADApromo);
$WADApromo mysql_query($query_limit_WADApromo$zeoconn) or die(mysql_error());
$row_WADApromo mysql_fetch_assoc($WADApromo);

if (isset(
$_GET['totalRows_WADApromo'])) {
  
$totalRows_WADApromo $_GET['totalRows_WADApromo'];
} else {
  
$all_WADApromo mysql_query($query_WADApromo$zeoconn);
  
$totalRows_WADApromo mysql_num_rows($all_WADApromo);
}
$totalPages_WADApromo ceil($totalRows_WADApromo/$maxRows_WADApromo)-1;
?>
<?php
$queryString_WADApromo 
"";
if (!empty(
$_SERVER['QUERY_STRING'])) {
  
$params explode("&"$_SERVER['QUERY_STRING']);
  
$newParams = array();
  foreach (
$params as $param) {
    if (
stristr($param"pageNum_WADApromo") == false && 
        
stristr($param"totalRows_WADApromo") == false) {
      
array_push($newParams$param);
    }
  }
  if (
count($newParams) != 0) {
    
$queryString_WADApromo "&" htmlentities(implode("&"$newParams));
  }
}
$queryString_WADApromo sprintf("&totalRows_WADApromo=%d%s"$totalRows_WADApromo$queryString_WADApromo);
?>
<?php 
// WA Application Builder Delete
if (isset($_POST["Delete"]) || isset($_POST["Delete_x"])) // Trigger
{
  
$WA_connection $zeoconn;
  
$WA_table "promo";
  
$WA_redirectURL "promo_results.php?prID=".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"")  ."";
  if (
function_exists("rel2abs")) $WA_redirectURL $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
  
$WA_keepQueryString false;
  
$WA_fieldNamesStr "prID";
  
$WA_columnTypesStr "',none,''";
  
$WA_fieldValuesStr "".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"")  ."";
  
$WA_comparisonStr "=";
  
$WA_fieldNames explode("|"$WA_fieldNamesStr);
  
$WA_fieldValues explode($WA_AB_Split$WA_fieldValuesStr);
  
$WA_columns explode("|"$WA_columnTypesStr);
  
$WA_comparisions explode("|"$WA_comparisonStr);
  
$WA_connectionDB $database_zeoconn;
  
mysql_select_db($WA_connectionDB$WA_connection);
  if (!
session_id()) session_start();
  
$deleteParamsObj WA_AB_generateWhereClause($WA_fieldNames$WA_columns$WA_fieldValues$WA_comparisions);
  
$WA_Sql "DELETE FROM `" $WA_table "` WHERE " $deleteParamsObj->sqlWhereClause;
  
$MM_editCmd mysql_query($WA_Sql$WA_connection) or die(mysql_error());
  if (
$WA_redirectURL != "")  {
    if (
$WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
      
$WA_redirectURL .= ((strpos($WA_redirectURL'?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
    }
    
header("Location: ".$WA_redirectURL);
  }
}
?>
<?php
//WA AltClass Iterator
class WA_AltClassIterator     {
  var 
$DisplayIndex;
  var 
$DisplayArray;
  
  function 
WA_AltClassIterator($theDisplayArray = array(1)) {
    
$this->ClassCounter 0;
    
$this->ClassArray   $theDisplayArray;
  }
  
  function 
getClass($incrementClass)  {
    if (
sizeof($this->ClassArray) == 0) return "";
      if (
$incrementClass) {
      if (
$this->ClassCounter >= sizeof($this->ClassArray)) $this->ClassCounter 0;
      
$this->ClassCounter++;
    }
    if (
$this->ClassCounter 0)
      return 
$this->ClassArray[$this->ClassCounter-1];
    else
      return 
$this->ClassArray[0];
  }
}
?>
<?php
//WA Alternating Class
$WARRT_AltClass1 = new WA_AltClassIterator(explode("|""|WADAResultsRowDark"));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
<?php
mysql_free_result
($WADApromo);
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...