close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Let's start a discussion about PHP versions

Thread began 10/12/2023 3:44 pm by Patrice | Last modified 3/25/2024 2:25 pm by Patrice | 623 views | 42 replies

Mags

Here's an example of how you get it to work with a standard DataAssist recordset.

<!--Give your table an id and include thead and tbody tags-->
<table id="myTable" >
<thead>
<tr>
<th>Lender</th>
<th>Adviser</th>
<th>Client</th>
</tr></thead>
<tbody>
<!--Create one row to display details from your recordset, then wrap the mySQLi repeat region behavior around the row-->
<?php
$wa_startindex = 0;
while(!$rsDetails->atEnd()) {
$wa_startindex = $rsDetails->Index;
?>
<tr>
<td><?php echo($rsDetails->getColumnVal("Lender")); ?></td>
<td><?php echo($rsDetails->getColumnVal("Adviser")); ?></td>
<td><?php echo($rsDetails->getColumnVal("Client")); ?></td>
</tr>

<?php
$rsDetails->moveNext();
}
$rsDetails->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</tbody>
</table>

Then include jQuery and the standard DataTables script in the head section and initialise your table:

<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/2.0.3/css/dataTables.dataTables.css" />
<script src="https://cdn.datatables.net/2.0.3/js/dataTables.js"></script>
<script>
$(document).ready( function () {
$('#myTable').DataTable();
} );
</script>

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