BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> User Tutorials
  New Posts New Posts RSS Feed - Querying
  FAQ FAQ  Forum Search   Register Register  Login Login

Querying

 Post Reply Post Reply
Author
Message Reverse Sort Order
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Topic: Querying
    Posted: Dec 13 2017 at 3:07pm
Hi,

1) You should set the page to PHP (menu Page->Extension or Server scripts in older versions)

2) You can add a Code Block Source type PHP (or any other type in which case you should insert <?php .. ?> tags yourself

3) Connect to DB and read data into a variable, e.g. $rows.

4) Now depending on how you handle your tables, you can either transform this into a Javascript variable or generate the table directly by PHP. Example of the latter: add a Code Block Visual where you need your table to be, inside which:

<table class='my-table-class'>
<?php
foreach($rows as $row) {
  echo "<tr><td>{$row['name']}</td><td>{$row['address']}</td></tr>";
}
?>
</table>
Back to Top
Agsabo View Drop Down
Newbie
Newbie
Avatar

Joined: Dec 13 2017
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Agsabo Quote  Post ReplyReply Direct Link To This Post Posted: Dec 13 2017 at 2:06pm
I need an assistance on how to use open element to querry a new created table from form and then displayed the table INFORMATION in thesame page. Thanks
Agsb
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.