Advanced Recordset

Let me see if I can explain what I am looking for. I work for
a company that does computer training and I am building a website
that will list the classes that we have to offer. I have setup a
page to display our IT Professional training and have setup a
recordset that will only display the "IT" training and it is sorted
by class name. There are a few subcategories that belong under "IT
training" for example "Com TIA ", "Microsoft", "Cisco". I want to
be able to group the subcategories together on one page without
creating more than one recordset. Is there a way to do this? It
should look something like this:
Com TIA
Class 1
Class 2
Class 3
Microsoft
Class 1
Class 2
Class 3
Cisco
Class 1
Class 2
Class 3
Please help and thanks to everyone in advanced.
Terrence

Terrence
Try this.
Get Tom Muck's extension, Simulated Nested Repeat Region
here
http://www.tom-muck.com/extensions/help/simulatednestedregion/
Site is slow right now.
Good luck.
Dave
"phillip6653" <[email protected]> wrote in
message
news:es20qr$ck7$[email protected]..
> Let me see if I can explain what I am looking for. I
work for a company
that
> does computer training and I am building a website that
will list the
classes
> that we have to offer. I have setup a page to display
our IT Professional
> training and have setup a recordset that will only
display the "IT"
training
> and it is sorted by class name. There are a few
subcategories that belong
under
> "IT training" for example "Com TIA ", "Microsoft",
"Cisco". I want to be
able
> to group the subcategories together on one page without
creating more than
one
> recordset. Is there a way to do this? It should look
something like this:
>
> Com TIA
> Class 1
> Class 2
> Class 3
> Microsoft
> Class 1
> Class 2
> Class 3
> Cisco
> Class 1
> Class 2
> Class 3
>
>
> Please help and thanks to everyone in advanced.
>
>
> Terrence
>

Similar Messages

  • Advanced recordset and variables problem

    Can anyone help!!!
    Im trying to build an advanced recordset for a seach query...
    Im using CS6, and I want to add 3 variables, now I write my query and  when I press ok on advanced recordset panel, some error pops up telling me they dont exist.
    What AM I DOING WRONG!!
    this is my query :
    SELECT Contrats.Client, Contrats.de, Contrats.a, Contrats.quantite,  Contrats.format, Contrats.etablissement, Etablissements.Nom,  Etablissements.Contact, Etablissements.Adresse, Etablissements.Ville,  Etablissements.telephone, Etablissements.Courriel
    FROM Contrats, Etablissements
    WHERE Etablissements.Nom=Contrats.etablissement AND etablissement1  AND Contrats.de BETWEEN De1 AND a1  AND Contrats.a BETWEEN De1 AND  a1
    My variables are ;
    varetablissement1 : type : text  -  Default value : -1 - Run-time value : $_GET('etablissement1')
    varDe1 : type : text  -  Default value : -1 - Run-time value : $_GET('De1')
    vara1 : type : text  -  Default value : -1 - Run-time value : $_GET('a1')
    Also after ok is pressed a new variable appears called totalRows and takes  over data from another variables, and making that data disapear from the original ...
    Everything works fine until this part :
    AND Contrats.de BETWEEN De1 AND a1  AND Contrats.a BETWEEN De1 AND a1
    Thanks for helping, Ive searched far and wide for any answers on this.

    Datatype for Etablissements.Nom is text, for Contrats.a and Contrats.de is date. Nom is capitalised for no particular reason, that's how I typed it at the time in php admin.
    Table structure for table Etablissements
    Column
    Type
    Null
    Default
    ID
    int(50)
    No
    Nom
    varchar(250)
    No
    Statut
    varchar(250)
    No
    Contact
    varchar(250)
    No
    Adresse
    varchar(250)
    No
    Secteur
    varchar(250)
    No
    Ville
    varchar(250)
    No
    Province
    varchar(250)
    No
    CodePostal
    varchar(250)
    No
    telephone
    varchar(250)
    No
    Courriel
    varchar(250)
    No
    Ristournes
    varchar(250)
    No
    Montant
    varchar(250)
    No
    Renouvellement
    date
    No
    Circuit
    varchar(250)
    No
    Age
    varchar(250)
    No
    Age2
    varchar(250)
    No
    Pourcent1
    varchar(250)
    No
    Pourcent2
    varchar(250)
    No
    maxexpress1
    varchar(250)
    Yes
    aucun
    maxdigital1
    varchar(250)
    Yes
    aucun
    megamax1
    varchar(250)
    Yes
    aucun
    maxexpress2
    varchar(250)
    Yes
    0
    Hommes
    varchar(250)
    Yes
    0
    Femmes
    varchar(250)
    Yes
    0
    Neutres
    varchar(250)
    Yes
    0
    Handicapes
    varchar(250)
    Yes
    0
    Maxdigital2
    varchar(250)
    Yes
    0
    Megamax2
    varchar(250)
    Yes
    0
    MDhommes
    varchar(250)
    Yes
    NULL
    MDfemmes
    varchar(250)
    Yes
    NULL
    MDneutres
    varchar(250)
    Yes
    NULL
    Table structure for table Contrats
    Column
    Type
    Null
    Default
    Id
    int(250)
    No
    ContratID
    varchar(250)
    No
    Client
    varchar(250)
    No
    de
    date
    No
    a
    date
    No
    quantite
    varchar(250)
    No
    format
    varchar(250)
    No
    rayon
    varchar(250)
    No
    etablissement
    varchar(250)
    No
    Hommes
    varchar(250)
    Yes
    NULL
    Femmes
    varchar(250)
    Yes
    NULL
    Neutre
    varchar(250)
    Yes
    NULL
    Handicape
    varchar(250)
    Yes
    NULL
    Notes
    varchar(10000)
    No
    annule
    varchar(250)
    No
    As for the examples of the variables passed in the querystring, do you mean what is passed from my search form?

  • Runtime value disapearing in the advanced recordset

    I am trying to create a master and a detail page to get, on the detail page, more details about an exporter (from exporters table) along with the Export Products (from Products table) offered by the particular exporter. When setting up the advanced recordset I introduced a variable varexporter
    Here's the recordset SQL
    SELECT exporters.exporterID, exporters.exporterName, exporters.exporterStreet, exporters.exporterCity, exporters.exporterZip, exporters.Country, exporters.exporterContact, exporters.exporterDesignation, exporters.exporterPhone, exporters.exporterFax, exporters.exporterEmail, exporters.exporterWebsite, exporters.exporterLogo, exporters.FactoryAddress, exporters.CommencementYear, exporters.Manufacturer_OR_Producer, exporters.EstablishmentType, exporters.SynopsisLink, products.productID, products.productName, products.image
    FROM exporters, products
    WHERE products.exporterID=exporters.exporterID AND exporters.exporterID=varexporter
    Once I save this DW creates another variable by the name totalRows and vipes out the runtime value of varexporter. The detail page is always generated with the default value of varexporter
    Please help me to write the correct sql query so that it gives the appropiate outcome for each link on the master page for exporters.
    Thanks and Regards

    Thank you bregent.
    As I do not know php and mysql I am getting Dreamweaver to do the work. Cama a long way till I got stuck here.
    Here are the codes in Full:
    Firstly, Master Page (works well and opens up the detail page witrh the correct URL parameter)
    <?php require_once('../Connections/ltndb.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;
    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;
    $currentPage = $_SERVER["PHP_SELF"];
    mysql_select_db($database_ltndb, $ltndb);
    $query_rs_category_apparel = "SELECT categories.`Catergory Image`, categories.categoryName FROM categories WHERE categories.categoryID=1";
    $rs_category_apparel = mysql_query($query_rs_category_apparel, $ltndb) or die(mysql_error());
    $row_rs_category_apparel = mysql_fetch_assoc($rs_category_apparel);
    $totalRows_rs_category_apparel = mysql_num_rows($rs_category_apparel);mysql_select_db($database_ltndb, $ltndb);
    $query_rs_category_apparel = "SELECT categories.`Catergory Image`, categories.categoryName FROM categories WHERE categories.categoryID=1";
    $rs_category_apparel = mysql_query($query_rs_category_apparel, $ltndb) or die(mysql_error());
    $row_rs_category_apparel = mysql_fetch_assoc($rs_category_apparel);
    $totalRows_rs_category_apparel = mysql_num_rows($rs_category_apparel);
    $maxRows_rs_details_apparel = 5;
    $pageNum_rs_details_apparel = 0;
    if (isset($_GET['pageNum_rs_details_apparel'])) {
      $pageNum_rs_details_apparel = $_GET['pageNum_rs_details_apparel'];
    $startRow_rs_details_apparel = $pageNum_rs_details_apparel * $maxRows_rs_details_apparel;
    mysql_select_db($database_ltndb, $ltndb);
    $query_rs_details_apparel = "SELECT exporters.exporterLogo, exporters.exporterName, exporters.exporterPhone, exporters.exporterEmail, products.productName, exporters.exporterStreet, exporters.exporterCity, exporters.exporterContact, exporters.exporterDesignation, exporters.exporterFax, exporters.exporterID, exporters.exporterZip, exporters.exporterWebsite, exporters.SynopsisLink, products.productID, products.image, exporters.Country, categories.categoryID FROM exporters, products,categories WHERE products.categoryID=1 AND exporters.exporterID=products.exporterID AND categories.categoryID=1 ORDER BY exporters.exporterName";
    $query_limit_rs_details_apparel = sprintf("%s LIMIT %d, %d", $query_rs_details_apparel, $startRow_rs_details_apparel, $maxRows_rs_details_apparel);
    $rs_details_apparel = mysql_query($query_limit_rs_details_apparel, $ltndb) or die(mysql_error());
    $row_rs_details_apparel = mysql_fetch_assoc($rs_details_apparel);
    if (isset($_GET['totalRows_rs_details_apparel'])) {
      $totalRows_rs_details_apparel = $_GET['totalRows_rs_details_apparel'];
    } else {
      $all_rs_details_apparel = mysql_query($query_rs_details_apparel);
      $totalRows_rs_details_apparel = mysql_num_rows($all_rs_details_apparel);
    $totalPages_rs_details_apparel = ceil($totalRows_rs_details_apparel/$maxRows_rs_details_apparel)-1;
    $queryString_rs_details_apparel = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rs_details_apparel") == false &&
            stristr($param, "totalRows_rs_details_apparel") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rs_details_apparel = "&" . htmlentities(implode("&", $newParams));
    $queryString_rs_details_apparel = sprintf("&totalRows_rs_details_apparel=%d%s", $totalRows_rs_details_apparel, $queryString_rs_details_apparel);
    $query_rs_category_apparel = "SELECT categories.`Catergory Image`, categories.categoryName FROM categories";
    $rs_category_apparel = mysql_query($query_rs_category_apparel, $ltndb) or die(mysql_error());
    $row_rs_category_apparel = mysql_fetch_assoc($rs_category_apparel);
    $totalRows_rs_category_apparel = mysql_num_rows($rs_category_apparel);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="Enter your description here so that you can take advantage of search engine optimization." />
    <meta name="author" content="The CSS Tinderbox - http://www.csstinderbox.com" />
    <link rel="stylesheet" type="text/css" href="../reset.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="../style.css" media="screen,print" />
    <title>the css tinderbox: fixed 4-column layout</title>
    <!-- InstanceParam name="id" type="text" value="page104" -->
    /* Googogle analytics*/
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-34050000-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    /* Googogle analytics*/
    </head>
    <body id="page104">
    <div id="mainContainer" class="clearfix">
    </div>
      <!--// end #header //-->
      <div id="navHorizontal">
        <ul>
          <li id="page1"><a href="../index.html">About Us</a></li>
          <li id="page2"><a href="../our_services.html">Our Services</a></li>
          <li id="page4"><a href="../products_services.php">Products</a></li>
          <li id="page5"><a href="../suppliers.php">Suppliers</a></li>
          <li id="page6"><a href="../contact_us.html">Contact Us</a></li>
        </ul>
      </div>
      <!--// end #navHorizontal //-->
      <div id="columnOne">
        <h1> </h1>
        <h2 id="listhead">Products & Services </h2>
        <p> </p>
        <div id="navVertical">
          <ul>
            <li id="page104"><a href="apparel.php" title="Page Link">Apparel  & Garment Accessories</a></li>
            <li id="page115"><a href="body_care.php" title="Page Link">Body Care Products</a></li>
            <li id="page113"><a href="cereals.php" title="Page Link">Cereals</a></li>
            <li id="page128"><a href="chemicals_plastics.php" title="Page Link">Chemicals &Plastics</a></li>
            <li id="page103"><a href="coconut_coconutproducts.php" title="Page Link">Coconut & Coconut Products</a></li>
            <li id="page120"><a href="computers_electronics.php" title="Page Link">Computers & Electronics</a></li>
            <li id="page123"><a href="fisheries_products.php" title="Page Link">Fisheries Products</a></li>
            <li id="page108"><a href="foliage_cutflowers.php" title="Page Link">Foliage & Cut Flowers</a></li>
            <li id="page112"><a href="fruits_vegetables.php" title="Page Link">Fruits & Vegetables</a></li>
            <li id="page106"><a href="gems_jewelry.php" title="Page Link">Gems & Jewellery</a></li>
            <li id="page116"><a href="handicrafts.php" title="Page Link">Handicrafts</a></li>
            <li id="page111"><a href="handloom_textiles.php" title="Page Link">Handloom & Textiles</a></li>
            <li id="page109"><a href="leather_leatherproducts.php" title="Page Link">Leather & Leather Goods</a></li>
            <li id="page126"><a href="machinery_equipment.php" title="Page Link">Machinery & Accessories</a></li>
            <li id="page114"><a href="metal_metalproducts.php" title="Page Link">Metal & Metal Products</a></li>
            <li id="page117"><a href="mineral_products.php" title="Page Link">Mineral Products</a></li>
            <li id="page121"><a href="ornamental_fish.php" title="Page Link">Ornamental Fish</a></li>
            <li id="page110"><a href="paper_paperproducts.php" title="Page Link">Paper Products &amp; Stationery</a></li>
            <li id="page122"><a href="pharmaceuticals_medicines.php" title="Page Link">Pharmaceuticals & Medicines</a></li>
            <li id="page124"><a href="food_beverages.php" title="Page Link">Processed Foods & Beverages</a></li>
            <li id="page102"><a href="rubber_rubberproducts.php" title="Page Link">Rubber & Rubber Products</a></li>
            <li id="page118"><a href="services.php" title="Page Link">Services</a></li>
            <li id="page107"><a href="spices_essentialoils.php" title="Page Link">Spices & Essential Oils</a></li>
           <li id="page101"><a href="tea.php" title="Page Link">Tea</a></li>
            <li id="page125"><a href="tissue_culture.php" title="Page Link">Tissue Culture</a></li>
            <li id="page105"><a href="tourism.php" title="Page Link">Tourism</a></li>
            <li id="page127"><a href="toys_games_sports_products.php" title="Page Link">Toys, Games & Sports Goods</a></li>
            <li id="page119"><a href="wooden_products.php" title="Page Link">Wooden Products</a></li>
          </ul>
        </div>
        <!--// end #navVertical //--> </div>
      <!--// end #columnOne //--><!-- InstanceBeginEditable name="col2" -->
      <div id="columnTwo">
      <h1> </h1>
      <h2>Column 2</h2>
      <table width="336" border="1" cellspacing="2" cellpadding="2">
        <tr>
          <th width="324" scope="row"><?php echo $row_rs_category_apparel['Catergory Image']; ?></th>
        </tr>
        <tr>
          <th scope="row"><?php echo $row_rs_category_apparel['categoryName']; ?></th>
        </tr>
      </table>
      <p> </p>
      <p>Lorem ipsum dolor sit amet, <strong>consectetuer adipiscing elit</strong>. Pellentesque hendrerit tellus mollis dolor. </p>
      <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. Aenean in nisi nec dui pretium bibendum. Praesent a sapien at dolor feugiat volutpat.</p>
      <h2>heading h2</h2>
    <p> </p>
      <p>Lorem ipsum dolor sit amet, <em>consectetuer adipiscing elit</em>. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
    <h3>heading h3</h3>
      <p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
      <h4>heading h4</h4>
      <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
      <ul>
        <li>Bullet List Item</li>
        <li>Bullet List Item</li>
        <li>Bullet List Item
          <ul>
            <li>Bullet List Item</li>
            <li>Bullet List Item</li>
          </ul>
        </li>
      </ul>
      <ol>
        <li>Numbered List Item</li>
        <li>Numbered List Item</li>
        <li>Numbered List Item
          <ol>
            <li>Numbered List Item</li>
            <li>Numbered List Item</li>
          </ol>
        </li>
      </ol>
      </div>
      <!-- InstanceEndEditable --><!--// end #columnTwo //--><!-- InstanceBeginEditable name="col3" -->
      <div id="columnThree">
        <h1> </h1>
        <h2>Column 3</h2>
        <?php do { ?>
          <table width="335" border="1" cellpadding="2" cellspacing="2">
            <tr>
              <th scope="row"> </th>
            </tr>
            <tr>
              <th width="324" scope="row"><?php echo $row_rs_details_apparel['exporterLogo']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['productName']; ?></th>
            </tr>
            <tr>
              <th scope="row"><a href="../exporter_profile.php?exporterID=<?php echo $row_rs_details_apparel['exporterID']; ?>"><?php echo $row_rs_details_apparel['exporterName']; ?></a></th>
            </tr>
            <tr>
              <th height="19" scope="row"><?php echo $row_rs_details_apparel['exporterStreet']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterCity']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterContact']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterDesignation']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterPhone']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterFax']; ?></th>
            </tr>
            <tr>
              <th scope="row"><?php echo $row_rs_details_apparel['exporterEmail']; ?></th>
            </tr>
            <tr>
              <th height="25" scope="row"> </th>
            </tr>
          </table>
          <?php } while ($row_rs_details_apparel = mysql_fetch_assoc($rs_details_apparel)); ?>
    <p> </p>
        <p>
          <?php if ($pageNum_rs_details_apparel > 0) { // Show if not first page ?>
      <a href="<?php printf("%s?pageNum_rs_details_apparel=%d%s", $currentPage, max(0, $pageNum_rs_details_apparel - 1), $queryString_rs_details_apparel); ?>">Previous</a>
      <?php } // Show if not first page ?>
          <?php if ($pageNum_rs_details_apparel < $totalPages_rs_details_apparel) { // Show if not last page ?>
            <a href="<?php printf("%s?pageNum_rs_details_apparel=%d%s", $currentPage, min($totalPages_rs_details_apparel, $pageNum_rs_details_apparel + 1), $queryString_rs_details_apparel); ?>"> Next </a>
            <?php } // Show if not last page ?>
        </p>
    </div>
      <!-- InstanceEndEditable --><!--// end #columnThree //--><!-- InstanceBeginEditable name="col4" -->
      <div id="columnFour">
        <h2>Column 4</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        <ul>
          <li>Bullet List Item</li>
          <li>Bullet List Item</li>
          <li>Bullet List Item
            <ul>
              <li>Bullet List Item</li>
              <li>Bullet List Item</li>
            </ul>
          </li>
        </ul>
      </div>
      <!-- InstanceEndEditable --><!--// end #columnFour //--><!-- InstanceBeginEditable name="edibanner" -->
      <div align="center" id="banner" >
        <p>Banner ads</p>
      </div>
      <!-- InstanceEndEditable -->
      <div align="center" id="footer">
        <ul id="bot">
          <li id="bot1" ><a  href="../index.html" >About Us</a></li>
          <li id="bot2"><a  href="../our_services.html" >Our Services</a></li>
          <li id="bot4"><a href="../products_services.php" >Products</a></li>
          <li id="bot5"><a  href="../suppliers.php" >Suppliers</a></li>
          <li id="bot6"><a  href="../contact_us.html" >Contact Us</a></li>
        </ul>
      <!--// end #footer //-->
    </div>
    <!--// end #mainContainer //-->
    </body>
    <!-- InstanceEnd --></html>
    <?php
    mysql_free_result($rs_category_apparel);
    ?>
    Secondly the detal page.
    <?php require_once('Connections/ltndb.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;
    mysql_select_db($database_ltndb, $ltndb);
    $query_rs_exporterprofile = "SELECT exporters.exporterID, exporters.exporterName, exporters.exporterStreet, exporters.exporterCity, exporters.exporterZip, exporters.Country, exporters.exporterContact, exporters.exporterDesignation, exporters.exporterPhone, exporters.exporterFax, exporters.exporterEmail, exporters.exporterWebsite, exporters.exporterLogo, exporters.FactoryAddress, exporters.CommencementYear, exporters.Manufacturer_OR_Producer, exporters.EstablishmentType, exporters.SynopsisLink, products.productID, products.productName, products.image FROM exporters, products WHERE products.exporterID = exporters.exporterID";
    $rs_exporterprofile = mysql_query($query_rs_exporterprofile, $ltndb) or die(mysql_error());
    $row_rs_exporterprofile = mysql_fetch_assoc($rs_exporterprofile);
    $totalRows_rs_exporterprofile = mysql_num_rows($rs_exporterprofile);$varexporter_rs_exporterprofile = "1";
    if (isset($_GET['exporterID'])) {
      $varexporter_rs_exporterprofile = $_GET['exporterID'];
    mysql_select_db($database_ltndb, $ltndb);
    $query_rs_exporterprofile = sprintf("SELECT exporters.exporterID, exporters.exporterName, exporters.exporterStreet, exporters.exporterCity, exporters.exporterZip, exporters.Country, exporters.exporterContact, exporters.exporterDesignation, exporters.exporterPhone, exporters.exporterFax, exporters.exporterEmail, exporters.exporterWebsite, exporters.exporterLogo, exporters.FactoryAddress, exporters.CommencementYear, exporters.Manufacturer_OR_Producer, exporters.EstablishmentType, exporters.SynopsisLink, products.productID, products.productName, products.image FROM exporters, products WHERE products.exporterID=exporters.exporterID AND exporters.exporterID=%s", GetSQLValueString($varexporter_rs_exporterprofile, "int"));
    $rs_exporterprofile = mysql_query($query_rs_exporterprofile, $ltndb) or die(mysql_error());
    $row_rs_exporterprofile = mysql_fetch_assoc($rs_exporterprofile);
    $totalRows_rs_exporterprofile = mysql_num_rows($rs_exporterprofile);
    $query_rs_exporterprofile = "SELECT exporters.exporterID, exporters.exporterName, exporters.exporterStreet, exporters.exporterCity, exporters.exporterZip, exporters.Country, exporters.exporterContact, exporters.exporterDesignation, exporters.exporterPhone, exporters.exporterFax, exporters.exporterEmail, exporters.exporterWebsite, exporters.exporterLogo, exporters.FactoryAddress, exporters.CommencementYear, exporters.Manufacturer_OR_Producer, exporters.EstablishmentType, exporters.SynopsisLink, products.productID, products.productName, products.image, products.exporterID FROM exporters, products ";
    $rs_exporterprofile = mysql_query($query_rs_exporterprofile, $ltndb) or die(mysql_error());
    $row_rs_exporterprofile = mysql_fetch_assoc($rs_exporterprofile);
    $totalRows_rs_exporterprofile = mysql_num_rows($rs_exporterprofile);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="Enter your description here so that you can take advantage of search engine optimization." />
    <meta name="author" content="The CSS Tinderbox - http://www.csstinderbox.com" />
    <link rel="stylesheet" type="text/css" href="reset.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="style.css" media="screen,print" />
    <title>the css tinderbox: fixed 4-column layout</title>
    <!-- InstanceParam name="id" type="text" value="pageX" -->
    /* Googogle analytics*/
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-34050000-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    /* Googogle analytics*/
    </head>
    <body id="pageX">
    <div id="mainContainer" class="clearfix">
      <div class="clearfix" id="header">
      </div>
      <!--// end #header //-->
      <div id="navHorizontal">
        <ul>
          <li id="page1"><a href="index.html">About Us</a></li>
          <li id="page2"><a href="our_services.html">Our Services</a></li>
          <li id="page4"><a href="products_services.php">Products</a></li>
          <li id="page5"><a href="suppliers.php">Suppliers</a></li>
          <li id="page6"><a href="contact_us.html">Contact Us</a></li>
        </ul>
      </div>
      <!--// end #navHorizontal //-->
      <div id="columnOne">
        <h1> </h1>
        <h2 id="listhead">Products & Services </h2>
        <p> </p>
        <div id="navVertical">
          <ul>
            <li id="page104"><a href="products/apparel.php" title="Page Link">Apparel  & Garment Accessories</a></li>
            <li id="page115"><a href="products/body_care.php" title="Page Link">Body Care Products</a></li>
            <li id="page113"><a href="products/cereals.php" title="Page Link">Cereals</a></li>
            <li id="page128"><a href="products/chemicals_plastics.php" title="Page Link">Chemicals &Plastics</a></li>
            <li id="page103"><a href="products/coconut_coconutproducts.php" title="Page Link">Coconut & Coconut Products</a></li>
            <li id="page120"><a href="products/computers_electronics.php" title="Page Link">Computers & Electronics</a></li>
            <li id="page123"><a href="products/fisheries_products.php" title="Page Link">Fisheries Products</a></li>
            <li id="page108"><a href="products/foliage_cutflowers.php" title="Page Link">Foliage & Cut Flowers</a></li>
            <li id="page112"><a href="products/fruits_vegetables.php" title="Page Link">Fruits & Vegetables</a></li>
            <li id="page106"><a href="products/gems_jewelry.php" title="Page Link">Gems & Jewellery</a></li>
            <li id="page116"><a href="products/handicrafts.php" title="Page Link">Handicrafts</a></li>
            <li id="page111"><a href="products/handloom_textiles.php" title="Page Link">Handloom & Textiles</a></li>
            <li id="page109"><a href="products/leather_leatherproducts.php" title="Page Link">Leather & Leather Goods</a></li>
            <li id="page126"><a href="products/machinery_equipment.php" title="Page Link">Machinery & Accessories</a></li>
            <li id="page114"><a href="products/metal_metalproducts.php" title="Page Link">Metal & Metal Products</a></li>
            <li id="page117"><a href="products/mineral_products.php" title="Page Link">Mineral Products</a></li>
            <li id="page121"><a href="products/ornamental_fish.php" title="Page Link">Ornamental Fish</a></li>
            <li id="page110"><a href="products/paper_paperproducts.php" title="Page Link">Paper Products &amp; Stationery</a></li>
            <li id="page122"><a href="products/pharmaceuticals_medicines.php" title="Page Link">Pharmaceuticals & Medicines</a></li>
            <li id="page124"><a href="products/food_beverages.php" title="Page Link">Processed Foods & Beverages</a></li>
            <li id="page102"><a href="products/rubber_rubberproducts.php" title="Page Link">Rubber & Rubber Products</a></li>
            <li id="page118"><a href="products/services.php" title="Page Link">Services</a></li>
            <li id="page107"><a href="products/spices_essentialoils.php" title="Page Link">Spices & Essential Oils</a></li>
           <li id="page101"><a href="products/tea.php" title="Page Link">Tea</a></li>
            <li id="page125"><a href="products/tissue_culture.php" title="Page Link">Tissue Culture</a></li>
            <li id="page105"><a href="products/tourism.php" title="Page Link">Tourism</a></li>
            <li id="page127"><a href="products/toys_games_sports_products.php" title="Page Link">Toys, Games & Sports Goods</a></li>
            <li id="page119"><a href="products/wooden_products.php" title="Page Link">Wooden Products</a></li>
          </ul>
        </div>
        <!--// end #navVertical //--> </div>
      <!--// end #columnOne //--><!-- InstanceBeginEditable name="col2" -->
      <div id="columnTwo">
        <h1> </h1>
        <h2>Column 2</h2>
        <p>Company Logo:</p>
        <table width="300" border="1" cellspacing="2" cellpadding="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterLogo']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
        <p>Company Name:</p>
        <table width="300" border="1" cellpadding="2" cellspacing="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterName']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
    <p>Brief description:</p>
    <table width="300" border="1" cellpadding="2" cellspacing="2">
      <tr>
        <th scope="row"><?php echo $row_rs_exporterprofile['SynopsisLink']; ?></th>
      </tr>
      <tr>
        <th scope="row"> </th>
      </tr>
    </table>
    <p> </p>
        <p>Lorem ipsum dolor sit amet, <strong>consectetuer adipiscing elit</strong>. Pellentesque hendrerit tellumollis dolor. </p>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. Aenean in nisi nec dui pretium bibendum. Praesent a sapien at dolor feugiat volutpat.</p>
        <h2>heading h2</h2>
        <p>Lorem ipsum dolor sit amet, <em>consectetuer adipiscing elit</em>. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
        <h3>heading h3</h3>
        <p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
        <h4>heading h4</h4>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit tellus mollis dolor. Cras urna. Sed tellus. </p>
        <ul>
          <li>Bullet List Item</li>
          <li>Bullet List Item</li>
          <li>Bullet List Item
            <ul>
              <li>Bullet List Item</li>
              <li>Bullet List Item</li>
            </ul>
          </li>
        </ul>
        <ol>
          <li>Numbered List Item</li>
          <li>Numbered List Item</li>
          <li>Numbered List Item
            <ol>
              <li>Numbered List Item</li>
              <li>Numbered List Item</li>
            </ol>
          </li>
        </ol>
      </div>
      <!-- InstanceEndEditable --><!--// end #columnTwo //--><!-- InstanceBeginEditable name="col3" -->
      <div id="columnThree">
        <h1> </h1>
        <h2>Column 3</h2>
        <p>Company Address:</p>
        <table width="300" border="1" cellspacing="2" cellpadding="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterName']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterStreet']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterCity']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterZip']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['Country']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
        <p>Contact Details:</p>
        <table width="300" border="1" cellspacing="2" cellpadding="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterContact']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterDesignation']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterPhone']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterFax']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterEmail']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
        <p>Company Website:</p>
        <table width="300" border="1" cellpadding="2" cellspacing="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['exporterWebsite']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
        <p>Exports:</p>
        <table width="300" border="1" cellspacing="2" cellpadding="2">
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['image']; ?></th>
          </tr>
          <tr>
            <th scope="row"><?php echo $row_rs_exporterprofile['productName']; ?></th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
          <tr>
            <th scope="row"> </th>
          </tr>
        </table>
        <p> </p>
        <p> </p>
        <ul>
          <li>Bullet List Item
            <ul>
              <li>Bullet List Item</li>
              <li>Bullet List Item</li>
            </ul>
          </li>
        </ul>
      </div>
      <!-- InstanceEndEditable --><!--// end #columnThree //--><!-- InstanceBeginEditable name="col4" -->
      <div id="columnFour">
        <h2>Column 4</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        <ul>
          <li>Bullet List Item</li>
          <li>Bullet List Item</li>
          <li>Bullet List Item
            <ul>
              <li>Bullet List Item</li>
              <li>Bullet List Item</li>
            </ul>
          </li>
        </ul>
      </div>
      <!-- InstanceEndEditable --><!--// end #columnFour //--><!-- InstanceBeginEditable name="edibanner" -->
      <div align="center" id="banner" >
        <p>Banner ads</p>
      </div>
      <!-- InstanceEndEditable -->
      <div align="center" id="footer">
        <ul id="bot">
          <li id="bot1" ><a  href="index.html" >About Us</a></li>
          <li id="bot2"><a  href="our_services.html" >Our Services</a></li>
          <li id="bot4"><a href="products_services.php" >Products</a></li>
          <li id="bot5"><a  href="suppliers.php" >Suppliers</a></li>
          <li id="bot6"><a  href="contact_us.html" >Contact Us</a></li>
        </ul>
      <!--// end #footer //-->
    </div>
    <!--// end #mainContainer //-->
    </body>
    <!-- InstanceEnd --></html>
    <?php
    mysql_free_result($rs_exporterprofile);
    ?>
    Thanks a lot in advance for your assistance in overcoming this hurdle.
    Rgds

  • Advanced recordset conditions

    I have a web page that displays UK counties that when a
    county is selected a new page opens with the towns and cities of
    that county in it. This recordset shows all the towns, cities but
    what I want to do is just list them by starting letter. T the top
    of the page |I want to be able to select the same county but
    different letters. Can this be done using DW.
    ================================
    Web page 1
    county_1 county_2 county_3 county_4 etc
    ================================
    ================================
    Web page 2
    Letter_A Letter_B Letter_C .................................
    Letter_Z
    Town/City_1
    Town/City_2
    Town/City_3
    Town/City_4
    etc
    ================================
    Thanks in advance
    Jai

    Never mind, I finally figured it out.  Whew...

  • Test value in advanced recordset

    HI
    In the binding recordset I have a filter looking for a date
    matching the URL parameter. In the simple panel, a valid test value
    returns normal data.
    Unfortunately, testing my web page does not returns any data.
    In the advanced panel of the recordset, testing the same
    query does not return any data. This is matching the result I have
    in the web page.
    1) Why the advanced test panel does not require a testing
    value.
    2) Why the 2 testings does not return the same results.
    Thanks

    I just ran into this problem too. Am running DW8 with CF8 on
    Mac.

  • Export Advanced Recordset from Database into XML

    I don't think I was clear on my previous post about my goal
    with Exporting an advanced MySQL query to an XML file.
    Simple example: I have a photo gallery that has pictures of
    various Architect Projects. The main page shows distinct images of
    various projects (like an index). When one clicks on this image to
    view the rest of the Project details, a detail page opens with more
    information and additional images within this project.
    I want to use Spry/Ajax to give the images nice dynamic
    effects on the detail page. Normally to get from an index page to a
    detail page using normal server-side procedures, one would have to
    set up a dynamic link to the detail page by passing the recordID
    thru a URL Parameter. The detail page would have a recordset query
    that would call the URL Parameter so that the distinct record
    chosen will be the only record displayed.
    When exporting this query from the database to XML, for some
    reason the following query only displays the <row> node in
    the schema when creating a Dataset. See the following sql query
    that I am trying to use on the detail page to create the dataset
    via XML:
    SELECT*
    FROM project_tbl
    WHERE projectID = [URL PARAM] projectID
    Why, when creating a dataset in Spry and exporting it into
    XML, will this query NOT work?
    What can I do to make this work? URGENT HELP will be kindly
    appreciated.

    Danilo,
    I do not have a link yet as the files are on my remote
    server. I have implemented the code you sent me but still no luck.
    Please see the code I have below:
    The XML Generating Page:
    <?php require_once('../Connections/plymouth.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $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
    // Query the database and get the selected records from
    Project & Images
    $colname_rsProject = "-1";
    if (isset($_GET['projectID'])) {
    $colname_rsProject = (get_magic_quotes_gpc()) ?
    $_GET['projectID'] : addslashes($_GET['projectID']);
    mysql_select_db($database_plymouth, $plymouth);
    $query_rsProject = sprintf("SELECT * FROM projects_tbl WHERE
    projectID = %s", GetSQLValueString($colname_rsProject, "int"));
    $rsProject = mysql_query($query_rsProject, $plymouth) or
    die(mysql_error());
    $row_rsProject = mysql_fetch_assoc($rsProject);
    $totalRows_rsProject = mysql_num_rows($rsProject);
    // Send the headers
    header('Content-type: text/xml');
    header('Pragma: public');
    header('Cache-control: private');
    header('Expires: -1');
    ?>
    <?php echo('<?xml version="1.0"
    encoding="utf-8"?>'); ?>
    <root>
    <?php if ($totalRows_rsProject > 0) { // Show if
    recordset not empty ?>
    <?php do { ?>
    <row>
    <?php foreach ($row_rsProject as $column=>$value) {
    ?>
    <<?php echo $column; ?>><?php echo
    $row_rsProject[$column]; ?></<?php echo $column; ?>>
    <?php } ?>
    </row>
    <?php } while ($row_rsProject =
    mysql_fetch_assoc($rsProject)); ?>
    <?php } // Show if recordset not empty ?>
    </root>
    <?php
    mysql_free_result($rsProject);
    ?>
    --------------------------------------------here is the
    source code to the projecct_detail page to display the
    content--------
    The projectID from the category page is being passed via a
    URL parameter. When I pull up the Spry Dataset in this page to
    display the nodes, this is the error I received (Unable to locate
    or parse the XML source (-1,-1). No nodes are being displayed.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"><!--
    InstanceBegin template="/Templates/temp.dwt.php"
    codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <link href="global.css" rel="stylesheet" type="text/css"
    />
    <!-- InstanceBeginEditable name="head" -->
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new
    Spry.Data.XMLDataSet("xml/detail.php><?php echo(
    isset($_GET['projectID'])?$_GET['projectID']:'' ); ?>", "row");
    //-->
    </script>
    <!-- InstanceEndEditable -->
    </head>
    <body class="oneColFixCtr">
    <div id="container"><!-- InstanceBeginEditable
    name="Main Content" -->
    <div id="mainContent">
    <h1> </h1>
    <p> </p>
    <!-- end #mainContent -->
    </div>
    <!-- InstanceEndEditable -->
    <div id="footer">
    <img src="images/banner.gif" width="500" height="66"
    alt="Plymouth Road Architects" />
    <br />
    <div id="nav">
    <table width="500" border="0" cellspacing="2"
    cellpadding="2">
    <tr>
    <td><div align="center"><a href="
    http://plymouthroadarchitects.com">HOME</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="company_info.php">ABOUT/CONTACT
    US</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="new_homes.php">NEW HOMES</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="additions.php">ADDITIONS</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="main_street.php">MAIN
    STREET</a></div></td>
    </tr>
    </table>
    </div>
    </div>
    <!-- end #container --></div>
    </body>
    <!-- InstanceEnd --></html>
    Sorry for all the confusion and not submitting this code to
    you earlier on this forum. I really do appreciate your feedback and
    assistance

  • Advanced recordset problem (DW inserting totalRows variable)

    Hi, i'm using DW CS4 and am working on my first database driven site. All keeps going well til I get to a certain task. I've recreated the site separately to make sure I'd not done anything silly but the same issue arises. I've created a recordset that takes a URL variable (orgname) and filters the information into a table no problem. I've put a series of links above the table that puts a second variable into the URL so it read something like this: "...orgdetail.php?orgname=BSMC&catname=S1"
    This kind of works for one link (where it picks up the default values in the variables I believe) but then falls apart. DW also inserts another variable 'totalRows' and screws the other variables up! I apologise for the vagueness of my query and hope to post a link up tomorrow to show more but can anyone shed any light on why DW would insert the totalRows variable??
    TIA...Andre

    I've uploaded the pages:
    http://pitlanepass.com/test/testindex.php
    http://pitlanepass.com/test/testorg.php
    I Think it may be an issue between default variable values and not every organisation has a rider of every category so it's dropping the URL variable?
    Heres a snippet of the code:
    $varOrgname_rsRiderdetail = "British Supermoto";
    if (isset($_GET['orgname'])) {
      $varOrgname_rsRiderdetail = $_GET['orgname'];
    $varCatname_rsRiderdetail = "S1";
    if (isset($_GET['catname'])) {
      $varCatname_rsRiderdetail = $_GET['catname'];
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetail = sprintf("SELECT riders.ridernumber, riders.riderfirst, riders.riderlast, riders.riderorganisation, riders.ridercat, riders.riderimage FROM riders WHERE riders.riderorganisation=%s  AND riders.ridercat=%s", GetSQLValueString($varOrgname_rsRiderdetail, "text"),GetSQLValueString($varCatname_rsRiderdetail, "text"));
    $rsRiderdetail = mysql_query($query_rsRiderdetail, $connPitlane) or die(mysql_error());
    $row_rsRiderdetail = mysql_fetch_assoc($rsRiderdetail);
    $totalRows_rsRiderdetail = mysql_num_rows($rsRiderdetail);
    $varOrgname_rsClassnavigation = "British Supermoto";
    if (isset($_GET['orgname'])) {
      $varOrgname_rsClassnavigation = $_GET['orgname'];
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsClassnavigation = sprintf("SELECT categories.catname FROM categories WHERE categories.catorganisation=%s", GetSQLValueString($varOrgname_rsClassnavigation, "text"));
    $rsClassnavigation = mysql_query($query_rsClassnavigation, $connPitlane) or die(mysql_error());
    $row_rsClassnavigation = mysql_fetch_assoc($rsClassnavigation);
    $totalRows_rsClassnavigation = mysql_num_rows($rsClassnavigation);
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetails = "SELECT riders.ridernumber, riders.riderfirst, riders.riderlast, riders.riderID, riders.ridercat, riders.riderorganisation, riders.riderimage, riders.riderdescription FROM riders";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetails = "SELECT riderID, riderfirst, riderlast, ridernumber, ridercat, riderorganisation, riderimage, riderdescription FROM riders";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    $query_rsRiderdetails = "SELECT riderID, riderfirst, riderlast, ridernumber, ridercat, riderorganisation, riderimage, riderdescription FROM riders ORDER BY ridernumber ASC";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    $totalRows_rsRiderdetails = mysql_num_rows($rsRiderdetails);
    ?>

  • A More Advanced Recordset

    I am creating a site where holiday offers can be selected from 4 geographic regions - UK/Ireland, Europe, USA and Rest of World. I am using DW CS4 and the Master/Detail pair. So far it is going ok and I can retrieve data from the database to display on the page. But now I need to develop it further so that I can display only the records from UK/Ireland on the UK/Ireland page, only the records from Europe on the Europe page and so on. I know it needs a WHERE clause but I do not know how to do this.
    I am not sure if it is safe to display the MySQL code on a public forum so please advise me as to what you need to see to help me sort this out.
    Many thanks.

    How do you know which geographic area your visitor is in? Because you have stored that info in your database? If so, then your WHERE clause is simply something like SELECT ... WHERE region='$region'
    But if you don't have that info stored in the database, you can determine their location by ip address. Check out the following:
    http://ip-to-country.webhosting.info/
    Then you can create PHP logic in your code like if $ipaddress > $lowrange AND < $highrange ...
    You should never store the connection info for your database in the actual web page. Never. It should be hidden above the webroot in an include file or function.

  • Multiple tables in a recordset.

    Hi all,
    I have got a bit stuck with creating an advanced recordset that calls from multiple sub tables. I have created the SQL statement below (originally used inner joins but the code got too long and still didn't work).
    SELECT *
    FROM Main_Table, Table_1, Table_2, Table_3, Table_4, Table_5, Table_6, Table_7, Table_8, Table_9, Table_10, Table_11, Table_12, Table_13, Table_14, Table_15
    WHERE
    (((((((((((((((((Main_Table.ID_1 = Table_1.ID_1),
    Main_Table.ID_2 = Table_2.ID),
    Main_Table.ID_3 = Table_3.ID),
    Main_Table.ID_4 = Table_4.ID),
    Main_Table.ID_5 = Table_5.ID),
    Main_Table.ID_6 = Table_6.ID),
    Main_Table.ID_7 = Table_7.ID),
    Main_Table.ID_8 = Table_8.ID),
    Main_Table.ID_9 = Table_9.ID),
    Main_Table.ID_10 = Table_10.ID),
    Main_Table.ID_10 = Table_11.ID),
    Main_Table.ID_11 = Table_12.ID),
    Main_Table.ID_11 = Table_13.ID),
    Main_Table.ID_11 = Table_14.ID),
     Main_Table.ID_12 = Table_15.ID),
    AND cust_id = colname
    The idea is to get some text values from the sub tables by passing through the relevant ID of the main table to the sub tables ID. To add to the complexity the "cust_id = colname" is a passthrough from a prior page that only brings up a specific record from the main table. Further complexity may come where the two bolded sections are using a single ID from the main table to call from multiple sub tables.
    Ideally at the end of this I just want to pull the value from the recordset and drop into the page design. The page is PHP and the database/web server is using WAMP, if that helps?
    I feel i'm so close (but i'm probably nowhere near!). Can anyone help me before I lose my hair and develop a nervous tick? Unfortunately, I am still a bit of a novice with these things, so if it's my syntax or a coding issue please could you explain it in noob terms for me?
    Thank you in advance!

    The database was an access DB of 1 main table and 15 related tables that was then converted to MYSQL. The idea is that it will serve two purposes from web pages setup to point to it;
    1) To add records to the main database with dropdowns. Certain data will be shown depending on the dropdown selected.
    2) To show a data-only details screen.
    The data is complicated survey data and it was decided that the main table would store the variables and the sub tables would store the constants (Between 2 to 6 records) using the ID to link them.
    e.g.
    Name = Main table.name
    Address = Main table.address
    Position = Table 2.position
    Department = Table 2.Department
    etc...
    Have tried the AND statement above but the system just times out.
    Would it be easier to create multiple recordsets (15 recordsets of 1 main table and 1 sub table) and link it somehow to the cust_id? If so, how would I best set each up so only the relevant fields are pulled from the sub table for each recordset? Or am I being to adventerous and should I just give up and flatten the tables to 1 single table?
    Am starting to thin up top with this one! lol!

  • How to change recordset bahaviour to accept dynamic column names in the where clause

    Hi
    im using php-mysql and i make a recordset and i want to make the column names in the where clause to be dynamic like
    "select id,name from mytable where $tablename-$myvar";
    but when i do this my i break the recordset and it disappear
    and when i use variables from advanced recordset it only dynamic for the value of the column not for the column name
    and when i write the column name to dynamic as above by hand it truns a red exclamation mark on the server behaviour panel
    so i think the only way is to change the recordset behaviour is it? if so How to make it accept dynamic column names?
    thanks in advance.

    As bregent has already explained to you, customizing the recordset code will result in Dreamweaver no longer recognizing the server behavior. This isn't a problem, but it does mean that you need to lay out your dynamic text with the Bindings panel before making any changes. Once you have changed the recordset code, the Bindings panel will no longer recognize the recordset fields.
    Using a variable to choose a column name is quite simple, but you need to take some security measures to ensure that the value passed through the query string isn't attempting SQL injection. An effective way of doing this is to create an array of acceptable column names, and check that the value matches.
    // create array of acceptable values
    $valid = array('column_name1', 'column_name2', 'column_name3');
    // if the query string contains an acceptable column name, use it
    if (isset($_GET['colname']) && in_array($_GET['colname'], $valid)) {
      $col = $GET['colname'];
    } else {
      // set a default value if the submitted one was invalid
      $col = 'column_name1'
    You can then use $col directly in the SQL query.

  • Can you use a php variable to filter a recordset?

    I've got a table of 'events', which have a description and
    more importantly for this a month ID number. (1-12 for the months
    of the year, when the event takes place) .
    I've used php's date function on a page to fund out
    numerically what month it is now $thismonth = date("n");
    i want to filter my recordset by only bringing up events that
    take place during the current month so where event_month =
    $thismonth
    IS this possible? It seems like it should be easy to do but I
    can't get it to work.
    Thanks in advance
    Dave

    jnkjnkjnkjnkjn wrote:
    > i want to filter my recordset by only bringing up events
    that take place
    > during the current month so where event_month =
    $thismonth
    >
    > IS this possible? It seems like it should be easy to do
    but I can't get it to
    > work.
    Yes, it's very easy, but you need to do a little hand-coding.
    In the
    Advanced recordset dialog box set the end of the SQL query to
    WHERE
    event_month = 1. When you have saved the recordset, change
    the SQL to
    WHERE event_month = $thismonth.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • CS5 Advanced Query - using a variable for a column name

    Hi
    I have been using Dreamweaver for a few years now, mostly version 8, but have just moved to CS5 (I teach it - among lots of other thing -  at what in the US would be a community college).
    I have problem with a page in CS5 that worked fine in my old version 8 edition.
    I am using PHP and MySQL as my server technologies
    I have a CD database and have constructed a Search Page which has a Form with a Text Box (stext) for the search criteria, and 3 option buttons to select the DB column I want to search on.  The option buttons are called sfield - and have values band, title, and/or year these will be passed to my display page (display.php) via GET array URL Parameters.  They are passed fine.
    I want to be able to enter "Pink" into the search text field, click the Band option button, and then my data displayed would inlude CDs by any band with Pink in their name i.e. Pink Floyd.  If I put 1989 and click the year option button, I search for all CDs from 1989 and so on.
    On my display page I created a recordset and selected my MySQL Server, DB Table, and using the simple dialogue selected band as the Filter and "contains" and the URL Parameter stext.   This all works as expected. I put in a  dynamic table and when I run it to test it, it will search on band only and works fine.
    Its when I try to select the column to search I get a problem.  I go to the advanced recordset dialogue.  I have the SQL
    Select * from newellcds where band like %colname%
    I need to change this to add a new variable, lookfield, which will hold my column selection from the option buttons (URL parameter: sfield), so I create the TEXT variable, with band as the default and the value of $_GET['sfield'] and put it into my SQL
    Select * from newellcds where lookfield like %colname% - and it doesn't work!!!  I always get no return from the database.
    After much experimentation, I echoed the Dreamweaver generated SQL on the screen and when I entered Pink and selected band on the search page, the Display SQL was displayed as:
    Select * from newellcds where 'band' like '%Pink%'
    Dreamweaver is putting single quotes round the value returned by my lookfield variable 'band' in this case.  If I enter the SQL without the quotes round Band into MySQL it works, with the quotes I get no returns.
    After this very long description - does anyone have an idea how to get rid of the quotes round my lookfield variable???
    How do I create a search page with two values passed - the actual criteria to search for, and the field to search for it in?
    Any help would be greatly appreciated.

    I don't have anything useful to contribute because I don't use DW to create queries, and you are not looking for help writing the query. You just want to get rid of the single quotes, which I can't help with.
    But based on your description, shouldn't the query be
    SELECT * FROM newellcds WHERE $sfield LIKE '%$stext%'
    If not, then I am not following.

  • How to set two values equal from different recordset?

    I have created a posts recordset and a comments recordset
    the comments table has a post_id to link the comment to a specific post through setting it equal to the id field in the posts table
    so that whenever a post loads the comment whos post_id is equal to the id of the post should load
    I know that if one advanced recordset combining the two tables is created I can set the values to be eqal in the where clause but doing so causes an error in the url parameters of the page.
    Plz help guys and thanks in advance.

    Just do this in advanced recordset
    SELECT *
    FROM posts JOIN comment
    ON posts.post_id = comment.post_id
    WHERE posts.post_id = colname
    Add 1 variable
    name: colname
    type: numeric
    default value: -1
    runtime value: $_GET['pid']
    so in browser URL it will be post_view.php?pid=1

  • How to make this work selecting advanced record set dreamweaver complains and crashes all the time

    Hi There
    I have met a person who does php and sql work but not with dreamweaver. The code I have works but dreamweaver shows me an error with my record sets and it crash all the time.
    <?php require_once('../Connections/datexdatabase.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;
    if($_GET['pageID']==''){
        $pageId = 1;
    }else{
        $pageId = $_GET['pageID'];
    mysql_select_db($database_datexdatabase, $datexdatabase);
    $query_rsIndex = "SELECT pages.title, pages.meta_keywords, pages.meta_description, content.header, content.`description`
    FROM pages INNER JOIN content ON pages.id = content.page_id WHERE pages.id = ".$pageId." ORDER BY content.order";
    $rsIndex = mysql_query($query_rsIndex, $datexdatabase) or die(mysql_error());
    $row_rsIndex = mysql_fetch_assoc($rsIndex);
    $totalRows_rsIndex = mysql_num_rows($rsIndex);
    ?>
    <?php do { ?>
            <?php if($row_rsIndex['header'] != 'Introduction'){ ?>
            <b><?php echo $row_rsIndex['header']; ?></b>
            <?php } ?>
            <p><?php echo$row_rsIndex['description']; ?></p>
            <?php } while ($row_rsIndex = mysql_fetch_assoc($rsIndex)); ?>
    <?php
    mysql_free_result($rsIndex);
    ?>
    I am able to join the tables in the advanced recordset but i am getting confused with "" FROM pages INNER JOIN content ON pages.id = content.page_id WHERE pages.id = ".$pageId." ORDER BY content.order";"
    mysql_select_db($database_datexdatabase, $datexdatabase);
    $query_rsIndex = "SELECT pages.title, pages.meta_keywords, pages.meta_description, content.header, content.`description`
    FROM pages INNER JOIN content ON pages.id = content.page_id WHERE pages.id = ".$pageId." ORDER BY content.order";
    My question is how can I use dreamweaver with the advanced recordset with the pageID without dreamweaver crashing 20 times a day
    Regards

    My question is how can I use dreamweaver with the advanced recordset with the pageID without dreamweaver crashing 20 times a day
    Do you get any errors in Dreamweaver when it crashes?
    What version?
    What OS?
    Have you tried trashing recreating the user config folder ( http://kb2.adobe.com/cps/405/kb405604.html#main_user_config )?
    Have you tried trashing the preferences ( http://kb2.adobe.com/cps/839/cpsid_83912.html )?
    Has anything changed on the system recently (from program installs, to system / OS updates)?
    Have you tried creating a new user account on the system to verify there is no corruption in the current user's system data?

  • Use Dreamweaver Log In To use for recordset PHP

    Hi I have gone through the tutorials on lost password
    recovery for dreamweaver, but wondering if I can use the login
    behaviour to do this.
    Would it simply be this:
    $loginFoundUser = "";
    $message = "";
    $from = "here is your [email protected]";
    $headers = "From: $from";
    if (isset($_POST['reg_username'])) {
    $loginFoundUser = (get_magic_quotes_gpc()) ?
    $_POST['reg_username'] : addslashes($_POST['reg_username']);
    mysql_select_db($database_config, $config);
    $LoginRS__query=sprintf("SELECT reg_username, reg_password
    FROM regid WHERE reg_username='%s' AND reg_password='%s'",
    get_magic_quotes_gpc() ? $loginUsername :
    addslashes($loginUsername), get_magic_quotes_gpc() ? $password :
    addslashes($password));
    $LoginRS = mysql_query($LoginRS__query, $config) or
    die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";
    && ($loginFoundUser> 0) {
    mail($loginFoundUser['reg_username'],"Your password","Your
    password is:
    ".$loginFoundUser['reg_password'],$headers);
    $message = "Your password has been e-mailed to you";
    } else {
    $message = "Sorry, the e-mail address you supplied is not in
    our database";

    jjjhbj111 wrote:
    > Would I be best doing a recordset that is basically
    searching the database:
    > SELECT reg_username, reg_password FROM regid WHERE
    reg_username =
    > 'varUsername' LIMIT 1;
    > and have a variable where varUsername =
    $GET['MM_Username'];
    A little knowledge is a dangerous thing. It seems as though
    you have
    some knowledge of how PHP works, but not yet enough to be
    able to adapt
    Dreamweaver code to your own requirements. For one thing, it
    should be
    $_GET, not $GET. The other thing is that MM_Username is a
    variable that
    Dreamweaver creates after searching the database.
    Rather than attempting to hack the Log In User server
    behavior, you
    would be much better off using an ordinary recordset to get
    the
    information that you want. I also think it's rather dangerous
    to send
    out someone's password without first checking the email
    address of the
    person requesting it. You might also want to employ the
    common technique
    of asking for the answer to a security question, such as
    mother's maiden
    name, date of birth, favourite food, or something similar.
    Create a form that collects username, email address, and
    optionally a
    the answer to a security question. Use the post method to
    submit the
    form and build a query in the Advanced Recordset dialog box
    using
    variables to get the values of $_POST['username'],
    $_POST['email'],
    $POST['security_answer']. Recordsets automatically create a
    variable
    that begins with $totalRows_ followed by the recordset name.
    If that
    variable is greater than 0, send the email. The password will
    be in
    $row_recordsetName['reg_password'] (change recordsetName to
    the actual
    name of the recordset).
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

Maybe you are looking for

  • Error while calling Computation process

    Hello Every Body I have a form for inserting informations . after the click on my submit button I redirect to another page on this page I have a textbox item called "P2_CODE_USER" In my first page i added a computation process that set in P2_CODE_USE

  • Tabs and stacked canvases ...

    Why are tab canvases effectively implemented as stacked canvases? It seems crazy that you have to first create a "content" canvas (which will never have any items placed on it) on which to display your tab canvas! I want to create the layout where I

  • File - ABAP Server Proxy - Error - CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV

    Hi, I am working on File-ABAP Proxy(Server) scenario. I've created the repository and integration objects correctly and have activated them. When I do a Test Configuration in the Integration Directory, I am getting the below error: <Trace level="1" t

  • On Demand - New Extension

    Hi, Is there any documentation available detailing out the procedure that should be followed to deploy an extension on E Business On Demand. If there is any special consideration made or would be similar to what is followed in on premise environment.

  • HT1751 i-tunes library syncing problem

    I recently copied a backup of my i-tunes library onto my laptop and whilst the library looks complete and I can play all tunes on my laptop, i am getting error messages when syncing (e.g. "unable to locate original file").  Any suggestion please??