Web DevCenter
oreilly.comSafari Books Online.Conferences.
MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA

Sponsored Developer Resources

Web Columns
Adobe GoLive
Essential JavaScript
Megnut

Web Topics
All Articles
Browsers
ColdFusion
CSS
Database
Flash
Graphics
HTML/XHTML/DHTML
Scripting Languages
Tools
Weblogs

Atom 1.0 Feed RSS 1.0 Feed RSS 2.0 Feed

Learning Lab






Using the SQL Select Statement in GoLive 6

by Derry Thompson
10/25/2002


A popular feature in Dynamic Content is providing some kind of search function, such as searching all data tables or searching all fields in a table. GoLive's Dynamic Content allows you to retrieve records from a data table using the match field routine -- a function that can be quite powerful. With a little knowledge of the SQL select statement, and a little editing in the source mode, you can provide sophisticated search routines for your users. Here's how.

Setting Up a Standard Search.

Set up a form to enter the search term. Drag a form element on to page, add a text field and name it "keyword", then add a submit button. Set the form method to post and the action to link to the same page the form is on.


The Page after the form has been inserted.
The page after the form has been inserted.

Next, set up the search results page.

Drop a replace rows object on to the page underneath the form. Add a Dynamic Content object to the header, and set it to a data table.

Page with the Repeat Rows Object added
Page with the repeat rows object added.

Now add the search pattern. Select the titl field and set it to match the request parameters. The field name is the default request parameter. This needs to be changed, since the search field uses keyword. To amend this, go to the filter records section. Then double click on the word titl and type keyword.

The inspector showing the Filter Records options
The Inspector, showing the Filter Records options.

The search results page will look something like this.

Sample results page
Sample results page.

You have set up a simple search and retrieve page.

Pages: 1, 2

Next Pagearrow