close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Data Assist results page customisation

Thread began 12/07/2011 9:00 pm by kata387222 | Last modified 12/09/2011 4:38 pm by kata387222 | 466 views | 1 replies

kata387222

Data Assist results page customisation

Hi
Just wanting to customise the auto generated results page from Data Assist. I have added a new recordset to perform a join and show related data from another table, but don't know how to specify the ID filter parameter to link connect IDs together.

I think that there is a string being passed but don't know which one to use. (looked like 'website' but did not work for me)


Your help will be much appreciated.

Here is the code for reference - (recordset2 is desperation)


<?php
$maxRows_WADAproduct = 20;
$pageNum_WADAproduct = 0;
if (isset($_GET['pageNum_WADAproduct'])) {
$pageNum_WADAproduct = $_GET['pageNum_WADAproduct'];
}
$startRow_WADAproduct = $pageNum_WADAproduct * $maxRows_WADAproduct;

$WADAwebsite_WADAproduct = "-1";
if (isset($_GET['website'])) {
$WADAwebsite_WADAproduct = (get_magic_quotes_gpc()) ? $_GET['website'] : addslashes($_GET['website']);
}
mysql_select_db($database_stm, $stm);
$query_WADAproduct = "SELECT prod_id, website, category, brand, prod_code, prod_name, prod_th, prod_des, related_1, related_2, related_3, related_4, related_5, related_6 FROM product ORDER BY brand ASC";
setQueryBuilderSource($query_WADAproduct,$WADbSearch1,false);
$query_limit_WADAproduct = sprintf("%s LIMIT %d, %d", $query_WADAproduct, $startRow_WADAproduct, $maxRows_WADAproduct);
$WADAproduct = mysql_query($query_limit_WADAproduct, $stm) or die(mysql_error());
$row_WADAproduct = mysql_fetch_assoc($WADAproduct);

if (isset($_GET['totalRows_WADAproduct'])) {
$totalRows_WADAproduct = $_GET['totalRows_WADAproduct'];
} else {
$all_WADAproduct = mysql_query($query_WADAproduct);
$totalRows_WADAproduct = mysql_num_rows($all_WADAproduct);
}
$totalPages_WADAproduct = ceil($totalRows_WADAproduct/$maxRows_WADAproduct)-1;
?>
<?php
$maxRows_WADADynListwebsite = 1000;
$pageNum_WADADynListwebsite = 0;
if (isset($_GET['pageNum_WADADynListwebsite'])) {
$pageNum_WADADynListwebsite = $_GET['pageNum_WADADynListwebsite'];
}
$startRow_WADADynListwebsite = $pageNum_WADADynListwebsite * $maxRows_WADADynListwebsite;

mysql_select_db($database_stm, $stm);
$query_WADADynListwebsite = "SELECT website, website FROM website ORDER BY website";
$query_limit_WADADynListwebsite = sprintf("%s LIMIT %d, %d", $query_WADADynListwebsite, $startRow_WADADynListwebsite, $maxRows_WADADynListwebsite);
$WADADynListwebsite = mysql_query($query_limit_WADADynListwebsite, $stm) or die(mysql_error());
$row_WADADynListwebsite = mysql_fetch_assoc($WADADynListwebsite);

if (isset($_GET['totalRows_WADADynListwebsite'])) {
$totalRows_WADADynListwebsite = $_GET['totalRows_WADADynListwebsite'];
} else {
$all_WADADynListwebsite = mysql_query($query_WADADynListwebsite);
$totalRows_WADADynListwebsite = mysql_num_rows($all_WADADynListwebsite);
}
$totalPages_WADADynListwebsite = ceil($totalRows_WADADynListwebsite/$maxRows_WADADynListwebsite)-1;
?>
<?php
$maxRows_WADADynListcategory = 1000;
$pageNum_WADADynListcategory = 0;
if (isset($_GET['pageNum_WADADynListcategory'])) {
$pageNum_WADADynListcategory = $_GET['pageNum_WADADynListcategory'];
}
$startRow_WADADynListcategory = $pageNum_WADADynListcategory * $maxRows_WADADynListcategory;

mysql_select_db($database_stm, $stm);
$query_WADADynListcategory = "SELECT category, category FROM category ORDER BY category";
$query_limit_WADADynListcategory = sprintf("%s LIMIT %d, %d", $query_WADADynListcategory, $startRow_WADADynListcategory, $maxRows_WADADynListcategory);
$WADADynListcategory = mysql_query($query_limit_WADADynListcategory, $stm) or die(mysql_error());
$row_WADADynListcategory = mysql_fetch_assoc($WADADynListcategory);

if (isset($_GET['totalRows_WADADynListcategory'])) {
$totalRows_WADADynListcategory = $_GET['totalRows_WADADynListcategory'];
} else {
$all_WADADynListcategory = mysql_query($query_WADADynListcategory);
$totalRows_WADADynListcategory = mysql_num_rows($all_WADADynListcategory);
}
$totalPages_WADADynListcategory = ceil($totalRows_WADADynListcategory/$maxRows_WADADynListcategory)-1;
?>
<?php
$maxRows_WADADynListbrand = 1000;
$pageNum_WADADynListbrand = 0;
if (isset($_GET['pageNum_WADADynListbrand'])) {
$pageNum_WADADynListbrand = $_GET['pageNum_WADADynListbrand'];
}
$startRow_WADADynListbrand = $pageNum_WADADynListbrand * $maxRows_WADADynListbrand;

mysql_select_db($database_stm, $stm);
$query_WADADynListbrand = "SELECT brand, brand FROM brand ORDER BY brand";
$query_limit_WADADynListbrand = sprintf("%s LIMIT %d, %d", $query_WADADynListbrand, $startRow_WADADynListbrand, $maxRows_WADADynListbrand);
$WADADynListbrand = mysql_query($query_limit_WADADynListbrand, $stm) or die(mysql_error());
$row_WADADynListbrand = mysql_fetch_assoc($WADADynListbrand);

if (isset($_GET['totalRows_WADADynListbrand'])) {
$totalRows_WADADynListbrand = $_GET['totalRows_WADADynListbrand'];
} else {
$all_WADADynListbrand = mysql_query($query_WADADynListbrand);
$totalRows_WADADynListbrand = mysql_num_rows($all_WADADynListbrand);
}
$totalPages_WADADynListbrand = ceil($totalRows_WADADynListbrand/$maxRows_WADADynListbrand)-1;

$paramProdID_Recordset1 = "-1";
if (isset($_GET['website'])) {
$paramProdID_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['website'] : addslashes($_GET['website']);
}
mysql_select_db($database_stm, $stm);
$query_Recordset1 = sprintf("SELECT * FROM product INNER JOIN related_products ON product.prod_id = related_products.related_id WHERE related_products.prod_id = %s", GetSQLValueString($paramProdID_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $stm) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

$colname_Recordset2 = "-1";
if (isset($_COOKIE['prod_id'])) {
$colname_Recordset2 = (get_magic_quotes_gpc()) ? $_COOKIE['prod_id'] : addslashes($_COOKIE['prod_id']);
}
mysql_select_db($database_stm, $stm);
$query_Recordset2 = sprintf("SELECT * FROM related_products WHERE prod_id = %s", GetSQLValueString($colname_Recordset2, "int"));
$Recordset2 = mysql_query($query_Recordset2, $stm) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>

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