close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Not able to create a Results Page using an Existing Database (Connection is working)

Thread began 7/27/2013 7:28 pm by holt3937911 | Last modified 7/29/2013 10:43 am by Jason Byrnes | 956 views | 7 replies |

holt3937911

Not able to create a Results Page using an Existing Database (Connection is working)

Just upgraded to DataBridge 1.1.4 (to get the newer version of Data Assist that works with Dreamweaver CC). Initially I had issues getting the Database connection defined and working....but that was resolved by WebAssist Support. Now that I have my connection working...I'm not able to create a simple Results page from an existing database hosted on a remote MySQL server.

I'm using the Data Assist Page wizard. As you can see in the images below my database table is found (Listing table ) and the columns of the table are shown in picking a Key column, but when I go to the Manage Pages tab.....none of the columns of my Listing table are shown in the UI.....I was expecting to be able to add columns or delete columns.....to customize what columns are to be rendered on my web page. The + control isn't enabled.

Any suggestions...?

I'm wanting to replicate the results I had previously using the older version of Data Assist......An example link is below.

http://www.pvtour.com/RealtorPage/RealtorPage.php

Thanks, Hol

Sign in to reply to this post

holt3937911

Repeating Tables not working Either

I've even tried to setup a page using Repeating Tables following the instructions from this Web Assist tutorial (link below)

Web development tutorial - Repeating Tables server behavior
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=24&accesscheck=/community/tutorials/view_tutorial.php?tid=24

Toward the bottom of this tutorial once you have completed the steps for the Applied Repeating Tables sections it references the existence of a single table cell containing the text "Your Repeated Content" (see attached image) .....In the following section Add Content to be Repeated - it outlines a set of instructions for replacing [Your Repeated Content], but my page has no such content.

So something must be globally wrong with how the Data Bridge products were installed.

Any suggestions would be greatly appreciated.

This thread references my problem too....where the page created is Blank in the Design view.
http://www.webassist.com/forums/posts.php?id=27835

From reviewing the code that was generated....it looks like the binding code for my binding was automatically inserted for me....in place of [Your Repeated Content]...but it doesn't appear to work. hmmmm

<?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_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_TestConnection, $TestConnection);
$query_Recordset1 = "SELECT listing.firstname, listing.lastname FROM listing";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $TestConnection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>

Sign in to reply to this post

holt3937911

Sorry for all the updates....trying to solve my own problem...while giving your Support team information to help me too. I totally created a new folder and PHP page...and tried the "Web development tutorial - Repeating Tables server behavior" tutorial. This time I was able to add the repeating table code that included [Your Repeating Content], however I was not able to drag the item binding to replace [Your Repeating Content].

The tutorial wasn't clear what I should be dragging ...it referenced dragging the ItemName binding - is this an individual column name in my binding (first name, last name...or the entire binding). I tried both..an single column name and the entire binding...but neither would replace the text. hmmmm

My table is setup as 3 columns and 5 rows.....(the Live view.....actually renders a table as such with each cell having [Your Repeating Content]...so some progress is being made.

Sign in to reply to this post

Jason ByrnesWebAssist

For the first issue, I think this a problem with the names of your columns.

in your screen shot, i see that you have a column named "Primary" This is a reserved word for MySQL. Se this page for a full listing of MySQL Reserved words:
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

MySQL Reserved words should be avoided as column names. The naming convention i like to use to ensure that i d not end up using a reserved word is to use the table name int he column name.

for example when creating a products table:
products:
productID
productName
productCategory
etc...


or createing a users table:
users:
userID
userFirstName
userLastName
userEmailAddress
etc....

by using the table name as a part of the column name, I end up with a naming convention that prevents issues with using the same name in 2 tables, I can identify easily in a recordset what column does what, and I prevent the possibility of using a reserved word.


When adding the bindings to the repeating table, you should select one item at a time from the recordset binding panel to add to the table cell. Not sure why the drag is not working, but the binding panel also has a bind button, select the column and click the bind button to add that binding to the design where your cursor is.

Sign in to reply to this post

holt3937911

Okay....the INSERT control works.......to add a binding to the code......but the results are not creating separate rows. The table was defined to use all rows with 5 columns.


I've tried to add 5 bindings to a single td definition (which I think is for a given column).....and also did individual bindings in separate td definitions...(which I would think would be more correct).

Sign in to reply to this post

Jason ByrnesWebAssist

The first way is the correct one, all of the bindings should go into one cell.

you can always create a display table inside the repeating cell if you like.

can you send a copy of the page so i can see the code to determine why it is not looping to the next row.

Sign in to reply to this post

holt3937911

Copy of Page Provided

Just to clarify.....the results do show contents from the 1st 5 rows of my database, they are rendered such that they are all on the same row in the browser as shown in my previous post with screen shots....Maybe I'm just not understanding how Repeating Tables are suppose to work. I'm expecting that I would have a table rendered with the columns I selected with rows for each of the rows in my database.

I'll attached the PHP file...once we get the rows to separate....then I'll check out whats involved with a Display Table inside the Repeating Table

Attached Files
TourPageExample.php
Sign in to reply to this post

Jason ByrnesWebAssist

The Repeating table behavior is intended to create a grid layout.

lets say you had a recordset that returns 3 column and you want to show a grid layout of the results using a layout grid where after 5 columns, it creates a new row.

in each cell you would display the 3 columns that are returned by the recordset. You could add a table to the repeating sell to layout how the data is displayed.

I think what you are trying to accomplish is a standard repeat region, not the repeating table behavior.

Sign in to reply to this post

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