close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

issues binding a result using a recordset to populate field in a repeating table.

Thread began 10/08/2021 3:45 am by Paul | Last modified 10/08/2021 5:37 pm by Paul | 27 views | 2 replies

PaulBeta Tester

issues binding a result using a recordset to populate field in a repeating table.

Using two sql tables, inventory and manufacturer

There are two fields in my manufacturer table; manufacturers id (integer) and manufacturers name (text)

Using DA ive created an insert, search and results page, based on the inventory table.

The insert page records the manufacturer id from a dynamic select, populated by a recordset using my manufacturer table as the source

The search page has a select search option populated by a recordset showing the manufacturers name in my manufacturer table.

When a user selects a manufacture name in their query, the search logic uses the manufacturer id to search the same value stored in the inventory table

In the repeating table on the results page, I have used a recordset to return the manufactuer name, not the stored ID.

The recordset for this task is configured as follows;

<?php
$rsMakeResult = new WA_MySQLi_RS("rsMakeResult",$devicesCOMM,1);
$rsMakeResult->setQuery("SELECT * FROM manufacturer WHERE manufacturer.manID=?");
$rsMakeResult->bindParam("i", "".($WADAinventory_v1->getColumnVal("mobMake")) ."", "-1"); //result
$rsMakeResult->execute();
?>

My issue:

What is presenting for each record in the repeating table, is the same manufacturer.manName (text value) for each record, not the actual manufacture name present in each record.

It seems when a query is executed using the 'All' option, the recordset is not cycling past the first record in my inventory table and using the first value to populate each record returned in the search results.
(The 'all' option value = 0 in my recordset)

So im seeing "Nokia" (incorrectly) appear for every record

Its not clear to me why?

*** update ***

Penny has dropped! Resolved

I took the main recordset and edited it in the query builder by creating a join between my inventory and manufacture table.
This created a new bind in the recordset which i then selected and placed in my repeating table.

Simple really!

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