Tom Muck

Alpha Dog Blues Band
Home page
All articles | DWTeam | Flash Remoting | Basic-Ultradev | Community MX
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Faq


Dynamic Search Suite: Frequently Asked Questions

Q: Does the extension work with Dreamweaver MX?

A: Yes.


Q: Does the extension work with Dreamweaver MX 2004?

A: Yes.


Q: Does the extension work with hand-coded pages?

A: No. The extension works in conjunction with pages that use the Dreamweaver MX recordsets.


Q: Do I need to enter anything in the second tab (Advanced)?

A: Only if you want to add some of the more advanced features, such as adding radio buttons/select box for Any Words, All Words, and Exact Phrase searches, or if you have an existing WHERE clause that you want to keep in addition to the new WHERE clause written by the server behavior


Q: Does the extension work with UltraDev?

A: The ASP/VBScript version of the extension has a separate download for an UltraDev-only version, for UltraDev 4. UltraDev 1 had a completely different architecture and is not supported. The PHP and CF versions DO NOT work with UltraDev. It also works with Dreamweaver MX.


Q: I tried to apply the extension to a table that displays the results of a stored procedure, but it isn't searching. Does it work with stored procedures?

A: It won't work with a standard stored procedure that returns a resultset because the SQL is generated dynamically by the extension. However, through careful hand coding you can adapt your stored procedure to accept a dynamic WHERE clause and make use of the extension. The extension is not supported for this type of page, though.


Q: I'm using the Sort Repeat extension on a search page, but when I click the table heading, I lose the search parameters.

A: There could be one of two problems: either you didn't fill in the box for "Use These Parameters" in the Sort Repeat Region extension, or you are using a Form-specifc variable reference in your recordset. When you create recordsets in UltraDev or Dreamweaver MX using the Simple recordset dialog box, the dialog box allows you to filter by form variable or by querystring variable. However, the way that many of the UltraDev or Dreamweaver MX server behaviors work is to allow you to use a Post method in your form, thereby filtering the recordset by the form variable, but on the second pass when you click a link to take you to the next set of results you are using a querystring variable instead of a form variable. You can do this by using a generic request variable instead of specifying a form variable. In other words, don't use this:

Request.Form("myFormVariable") ASP
#Form.myFormVariable# ColdFusion

instead, use this:

Request("myFormVariable") ASP
#myFormVariable# ColdFusion


Q: Does this server behavior work with the Recordset Navigation Suite or the Sort Repeat Region server behavior?

A: Yes, it is fully compatible with those extensions.


Q: Which PHP server model does the extension work with?

A: It works only with the MySQL server model in Dreamweaver.


Q: Can I use the extension with two recordsets or search two tables in a database?

A: There is really no way to do this with a standard search, but you can do it in a View (SQL Server) or Query (Access), and then use that on your page instead of the database table. In order for that to work, you have to create a view that uses a UNION, and the fields have to match. I usually give each column name an alias if the table columns don't match, like this:

SELECT table1_myfield as myfield
, table1_myfield2 as myfield2
, table1_myfield3 as myfield3
, '' as myfield4
FROM table1

UNION

SELECT table2_anotherfield as myfield
, table2_anotherfield2 as myfield2
, table2_anotherfield3 as myfield3
, table2_anotherfield4 as myfield4
FROM table1

ORDER BY myField, myField2, myField3,myField4

Notice that the first table in my query is short by one column, so I merely created an alias to an empty string to complete the UNION. Then you merely have to use the View in your page:

SELECT * FROM myView

If your database does not support views, you might be able to code the SQL in your page instead.

Q: Using the PHP version, can I use the extension the POST method and return multiple results pages using recordset navigation?

A: Unfortunately, this is a function of the navigation behaviors. They are set up to use the query string, not the form post. Indeed, the only advantage to using a POST method is to hide the parameters from the user, but recordset navigation will not work with a hidden query string. For that reason, it is better to use the GET method when dealing with multi-page search results.

Having said that, there is a way to add the post variable to the querystring:

after this section appears:

if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Recordset1") == false &&
      stristr($param, "totalRows_Recordset1") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Recordset1 = "&" . implode("&", $newParams);
  }
}

add this code:

if(isset($_POST["search"])) {
  $queryString_Recordset1 = sprintf("&search=%s%s", $_POST["search"], $queryString_Recordset1);
}

Substitute your own search parameter and your own recordset name.

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2017 Tom Muck | Dreamweaver Extensions