close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Managing filtered recordsets with DA

Thread began 4/19/2010 8:26 pm by neo314 | Last modified 4/22/2010 4:40 pm by neo314 | 704 views | 5 replies |

neo314

Managing filtered recordsets with DA

I am trying to build using DA as a replacement for ADDT which I have generally used for my back-end for a number of reasons, not the least of which is the ability to manage based on recordsets as well as tables.

I am currently using session values and manually changing the SQL of the pages as necessary to accomplish this.

I know recordset management has been frequently requested. I am wondering if you have any tutorials or other documentation that might illuminate me on a better way to do this as I plunge forward. I would like to rely more on DA for my back-end, but so far, it is a lot more work for me.

What I want to do, for example, is to have a pages table with an idpage foreign key that refers back to the pages table. The pages are also tied to locations, so I need to filter for the current location (field = idloc). If idpage is 0, it is a top level page, otherwise it has the id of it's parent page.

The problem is persistence of the parameters of these filters. I can modify the SQL, but pass original query string does not seem to work and the hard links in the pages the wizard generates makes it a nightmare of a maze to ensure the parameters for idloc and idpage remain in the URL without duplicating as you navigate through the DA pages.

Sign in to reply to this post

mr hankey

i too am trying to generate filtered recordsets and would love for a simple way or documentation without running through wizard completely to generate pages.

if you have any luck please let me know.

thanks

Sign in to reply to this post

Jason ByrnesWebAssist

If I'm reading the question correctly, this sentence really is the key to your problems:

  The problem is persistence of the parameters of these filters. I can modify the SQL, but pass original query string does not seem to work  




the pass original querystring feature relies on the query string being present in the forms post.

In other words, if you have a page:
update.php


and you browse to it with a query string var:
update.php?id=4


and you have a form with the following action:
<form action="update.php" name="form1" method="post">
</form>

the query string is absent when the form posts, so the pass original query string setting does not have a query string to work with.


make sure any query string vars that are passed to the page are posted when the form posts, use the following for the forms action:

php:
<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>



example:

php:
<form  action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>" name="form1" method="post">
</form>
Sign in to reply to this post

neo314

Hi Jason,

Thanks for responding. I understand what is required. The problem is, if I use the DA wizard to create the pages, and check the "pass original querystring" box, the DA generated pages do not contain links that preserve the query string.

If I enter the DA pages with idlocation=1&idstyle=3, the DA pages should preserve that query string in the links. In ADDT, I did have to add this kind of information to a just couple of links, but everything was on 2 pages (list and detail).

When I tried to do the same with DA, there were a lot more adjustments that seemed to be necessary. It just seemed to take too long and I wasn't sure I was covering all the bases. I'm losing the benefit of using the extension.

Currently, I am adjusting the SQL and using SESSION values to manage the persistence. I gather there is no better recommendation.

It would be great if the wizard could:

  1. Generate it set based on a recordset as well as a table, and
  2. preserve the querystring that exists when the user enters the DA pages throughout the links in the pages.


P.S. I know there are a number of ways to "enter the DA pages" so what I mean is that DA, I believe, only uses id=X, so it needs to add and drop that, but preserve the rest.

Sign in to reply to this post

Jason ByrnesWebAssist

I will ad a feature request.

Sign in to reply to this post

neo314

Thanks Jason.

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