WebSite X5Help Center

 
Ainaras A.
Ainaras A.
User

Sending Data to Database from Contact Form: Data displayed in Ascending Order  en

Autore: Ainaras A.
Visite 1092, Followers 1, Condiviso 0  

Hi, When submiting data from Contact form to Database, the data then being displayed in ascending order in database viewer. I really need my data to be displayed in descending order, so new fresh data submitted is always on the top of the list. I cant find any options to change in X5 software, neither Contact form or Database viewer.  I have already contacted my hosting provider, but they just confirmed once again that the option is run by the script, advising me to include 'order by id desc' command somewehre.. .Can you please advice what to do as I now totaly stuck with my project.  Thanks

Postato il
4 RISPOSTE
John S.
John S.
User

Hello Ainaras

There is not much settings you can do in the database viewer.

But you can , when data is viewed, sort the columns you want. This way you only have to do one click - and you can sort on all fields.

If you want to sort on newest/oldest you have to let the ID be viewed - or you could ´have a datefield. When the table is created by X5, then you can add extra fields and let these field be automatic created - it could be a timestamp.

For the sorting :

Just click on the triangles in the column header. A click will cause the sorting to be descending or ascending.

But the sorting is not remembered so you have to do this extra click every time you view the table.

Another solution is to use a database tool as AppGini ( https://bigprof.com/appgini/ )

With this, you can set all settings predefined for a table. And you have a good tool for creating databases. With this tool, you can also give users access, and you can for a group of users set priviligees for tables like : allowed to cretae records, edit, view, delete. It is an amazing tool for databases, but it is not free.

If the sorting of the columns could solve your problem, it will be the simplest, I think.

Leggi di più
Postato il da John S.
John S.
John S.
User

I have an example of a rather simple database made/shown with the tool mentioned here :

http://eksempelsite.dk/side-4.html

And I have another here : http://eksempelsite.dk/engdr/eng_firms_view.php

In the last example there is child-tables connected to the records shown, and also these child-records has child-records.

If you go to this record : http://eksempelsite.dk/engdr/eng_firms_view.php?SelectedID=14 you will see that there is made a "menu" where you can see pages, and some of these pages have products.

But the first example is more relevant for you I think.

To save space I have removed the header with the login/logout, but I made a login in a "home" page.:

http://eksempelsite.dk/engdr/

It is just some test examples.

If the sorting is not an option for you then I hope you could be inspired by these examples.

For each table it can be pre-defined which column is to be sorted on by default and if the sorting should be ascending or descending.

Also here the data can be sorted by columns and data can be filtered and searched.

Leggi di più
Postato il da John S.
Ainaras A.
Ainaras A.
User
Autore

Hi John, thanks for your suggestions. The Appgini app seems to be really powerful tool. Its not free, but its not expecive and only one time payment. 

Its just really annoing that a simple thing like db view order kills the project. I love X5 Software, very powerfull engine creating page after page, but sometimes small bits/options that everyone would expect them to be there somewhere, simply does't exists..  

How did you integrate Appgini database into X5 so it runs withwin your own website? http://eksempelsite.dk/side-4.html

Thanks

Arni

Leggi di più
Postato il da Ainaras A.
John S.
John S.
User

I am using iframes.

The Appgini has a standard-setting that allows the tables to be viewed in iframes, when on the same domain.

You cannot view the tables in an iframe on another domain - unless you change the settings in the AppGini project.

The tables is responsive. This functions very well. If you want the tables/database to be viewed on mobiles or tablets, you should have a link to the table with the table NOT "packed" in an iframe.

If it is just a question of viewing data, then you could maybe take a look at the free REPORTICO.

http://www.reportico.org/site2/index.php

This is a great tool to view/sort/select data. Tables can be joined. Data can be printed to PDF's.

Much much more functionality than in the database-viewer object. 

But if you want to work with databasees/tables then AppGini really is a great tool.

Leggi di più
Postato il da John S.