close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help with repeating table wizard

Thread began 8/12/2010 11:03 am by iainmacdonald331081 | Last modified 8/12/2010 3:16 pm by iainmacdonald331081 | 1258 views | 3 replies

iainmacdonald331081

Help with repeating table wizard

As a follow up to my other thread, I'm now trying to recreate the grid layout DA created when I originally ran it to create the results page for a table of Destinations :

destinationstemp.php

(One issue there is the images extending beyond 182px wide, even though I've specified a width for the image. But that's less of a concern just now - I can add in some code to fix that that I've used in the past).

I also have the page for tour package details, which now pulls through the destinations linked to the selected tour package.

So I'm just trying to replicate the grid layout in the page above on this page :

packageDetailsTest3.php?packageID=140

I just tried using DA's Repeating Table wizard, but when I fired it up, it couldn't see any recordset to work with.

I assume its something to do with the way the code is at the top of the page - Dreamweaver doesn't seem to see it either, in its database server behaviours panel.

At the moment all of that looks like :

php:
<?php require_once('Connections/connPackages.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
if (!session_id()) session_start(); 
?>
<?php
$ParampackageID_WADApackages 
"-1";
if (isset(
$_GET['packageID'])) {
  
$ParampackageID_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
}
$ParamSessionpackageID_WADApackages "-1";
if (isset(
$_SESSION['WADA_Insert_packages'])) {
  
$ParamSessionpackageID_WADApackages = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_packages'] : addslashes($_SESSION['WADA_Insert_packages']);
}
$ParampackageID2_WADApackages "-1";
if (isset(
$_GET['packageID'])) {
  
$ParampackageID2_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
}
mysql_select_db($database_connPackages$connPackages);

$query_WADApackages sprintf("SELECT packageID, package, costperpax, duration, baselocation, category, dateadded, agerange, hotel, educational_tours, field_trips, corporate_outings, plant_visits, budget_package, rollingtours, teambuilding, description, offer FROM packages WHERE packageID = %s OR ( -1= %s AND packageID= %s)"GetSQLValueString($ParampackageID_WADApackages"int"),GetSQLValueString($ParampackageID2_WADApackages"int"),GetSQLValueString($ParamSessionpackageID_WADApackages"int"));
$WADApackages mysql_query($query_WADApackages$connPackages) or die(mysql_error());
$row_WADApackages mysql_fetch_assoc($WADApackages);
$totalRows_WADApackages mysql_num_rows($WADApackages);

$colname_WADAdestinations "1";
if (isset(
$_GET['packageID'])) {
  
$colname_WADAdestinations = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
}
mysql_select_db($database_connPackages$connPackages);
$query_WADAdestinations sprintf("SELECT * FROM destinations INNER JOIN (packages INNER JOIN packagedestinations ON packages.packageID = packagedestinations.packageID) ON destinations.destinationID = packagedestinations.destinationID WHERE packages.packageID = %s ORDER BY destination ASC"GetSQLValueString($colname_WADAdestinations"int"));
$WADAdestinations mysql_query($query_WADAdestinations$connPackages) or die(mysql_error());
$row_WADAdestinations mysql_fetch_assoc($WADAdestinations);
$totalRows_WADAdestinations mysql_num_rows($WADAdestinations);$colname_WADAdestinations "1";
if (isset(
$_GET['packageID'])) {
  
$colname_WADAdestinations = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
}
?>



Any ideas what's going on with the recordset? Or if it only exists as a query how to make it appear as a recordset?

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...