WebSite X5Help Center

 
Peter P.
Peter P.
User

Editing data stored in a sql database  en

Auteur : Peter P.
Visité 366, Followers 1, Partagé 0  

Hi

I have setup a client database and input some information using the contacts form, all seems to work OK, I can view the data via the database viewer, what is the best way of recalling, viewing and editing the data in that database.

Kind Regards

Peter.

Posté le
5 RéPONSES - 1 UTILES
Peter P.
Peter P.
User
Auteur

Hi Paul,

Thank you, I know the data is stored in phpMyAdmin, I'm not too sure how to read a record from the database back into website x5 so I can make changes if required and write the changes back to the sql database, is there an object that I can use or do I need to source some code to make changes to a record.

Kind Regards

Peter.

Lire plus
Posté le de Peter P.
Paul M.
Paul M.
Moderator
Meilleur utilisateur du mois EN

phpMyAdmin doesn't actually store any data (the data resides in the MySQL database), but it will allow you to read and write to the database.  In fact, there is nothing that you cannot do with the data if you use phpMyAdmin.

WebSite X5 does have a tool which can read the data from a database, in the form of an Optional Object:

https://market.websitex5.com/en/objects/live-preview/371262fa-27c5-421a-9127-852da219d4

However, you can't use that object to write to the database.

If you want to write to the database dynamically then you will either have to write some custom code, or hire a programmer to do the same on your behalf.

Alternatively, you can use phpMyAdmin (or a similar utility) to enter data directly into the database manually.

Lire plus
Posté le de Paul M.
John S.
John S.
User

Hello Peter

You could have a simple script that reads data from the database, and eventually select the data on types.

I am working on a site where the user want to maintain data by himself - but without the need to have any software.

Here : https://mogenshansen49.dk/temaer.html you can see a page where you can choose between 3 different themes. 

For each theme there is a text that describes the theme, and a table that shows information for items for the theme.

The client can log into the database and maintain the data. This can easily be made via software like AppGini.

The scripts that are made to get the data from the databae is made in php. It is quite simple scripts.

The scripts is put into a HTML object on the page - her eit is made with 2 objects - one for the page text and one for the table.

With this method, you are able to let a client maintain his own data without the need for him, to use complicated software. With AppGini it is quite easy to create tables where you can set access levels ( Allow to : create, edit, delete records ) for a user or a group of users - for each table.

You can see the tables where it is possible to login for editing here : https://mogenshansen49.dk/base/

The 3 themes comes from the same tables - on each page is used nearly the same php-script. The difference is that the selection is on type 1, 2 or 3.

I think the answer to your question is to use a database tool like AppGini.

You can then show the data from the database via a script like here : https://mogenshansen49.dk/kulturhistorie.html

Or integrate the AppGini application in your site like here : https://mogenshansen49.dk/foredrag.html

Or have the application on its own ( for mobile use ) like here : https://mogenshansen49.dk/base/Foredrag_view.php

The benefit of using a database tool is, that it will be easy to maintain data - and - it will be possible to give users access to maintain data via a login.

Lire plus
Posté le de John S.