MySQL CRUD not showing current records

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
KaiMartinsen
 
 
Posts: 30
Joined: Tue Nov 29, 2022 11:53 am

MySQL CRUD not showing current records

Post by KaiMartinsen »

I am able to add records, but the database's records is not showing in the list.

Why is that?

What am I doing wrong?
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

Please try to be more specific.
What are your settings?
What is the database structure?
Are there any errors?
KaiMartinsen
 
 
Posts: 30
Joined: Tue Nov 29, 2022 11:53 am

Re: MySQL CRUD not showing current records

Post by KaiMartinsen »

I have a Bootstrap Table which is connected to the MySQL database and it shows the records just fine.

This is the settings for the MySQL CRUD:

Image

It is connected to the same database with the same user.

When I add records, the records are added to the database and shown in the Bootstrap Table.

The MySQL database table fields are: ID (auto increment), title (text) and text (longtext)

This is the settings for the Bootstrap Table:

Image


More info:

The Bootstrap table is on the page database.php
The MySQL CRUD is on the page redigerer.php


This is that the MySQL CRUD looks like on redigerer.php:
It is possible to add records but it does not show any of them in the CRUD editor itself.
Image
Last edited by KaiMartinsen on Fri Apr 12, 2024 5:50 pm, edited 1 time in total.
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

Are you sure the fields names are correct?
Note that these are case sensitive.

Also, you have set 'listview' of all items to 'no'!
And the primary key must be in the listview, as documented in the PDF.
KaiMartinsen
 
 
Posts: 30
Joined: Tue Nov 29, 2022 11:53 am

Re: MySQL CRUD not showing current records

Post by KaiMartinsen »

Thank you.

It was the listview setting that was wrong.

Another question:
How do I change the order of the list (by default)?

descending vs. ascending
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

In the filter property you can add additional SQL.

For example:

Code: Select all

1=1 ORDER BY fieldname DESC 
KaiMartinsen
 
 
Posts: 30
Joined: Tue Nov 29, 2022 11:53 am

Re: MySQL CRUD not showing current records

Post by KaiMartinsen »

Thank you so much! :)
Paul
 
 
Posts: 124
Joined: Thu Feb 07, 2013 3:13 am

Re: MySQL CRUD not showing current records

Post by Paul »

Hello,

If I understand correctly, if I add in the filter option of the extension: ''ORDER BY No ASC' , my registration numbers will go past 1, 2,3,4,5.... The problem is that the search result displays the numbers in descending order. e.g. 999,998, 997 instead of 1,2, 3,...997, 998,999, ... I use the filter option to correct this situation but I get a message: "Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in..."

Thanks
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

Did you also add "1=1"? otherwise the WHERE statement will be invalid.
Paul
 
 
Posts: 124
Joined: Thu Feb 07, 2013 3:13 am

Re: MySQL CRUD not showing current records

Post by Paul »

I have add :

'1=1 ORDER BY No DESC'

error :
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in ..... on line 148

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in .... on line 154
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

It is difficult to help you without seeing all your setting.
craigcampbell
 
 
Posts: 3
Joined: Tue Jul 16, 2024 8:10 pm

Re: MySQL CRUD not showing current records

Post by craigcampbell »

I'm having the same issue with a trivial page.
I can ADD records to the file, and they appear (when I check the file), but the files current contents are never listed.

I've boiled it down to what I hope was the simplest test possible.

The test can be viewed live at http://eahl.ca/index.php (if I'm allowed to post that)

I entered two (2) fields of type editbox. Required=yes and listview=yes

The test file currently contains,
fred,freddata
fred2,freddata2
Creag,craigdatat
craigc,craigdata2
craig3,craigdata3

Adding records works,
Search produces the following error message,

Warning: A non-numeric value encountered in /data/www/jail/eahl.ca/htdocs/wb.csv.crud.php on line 147

The referenced line 147 contains,
return (stristr($row[$csv_column+1], $csv_value) !== FALSE);
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

Based on your description it sounds like you are using a different extension?
So, I doubt that this is the same is issue.

But anyway, to be able to help you, I need a DEMO project (.wbs file) so I can see all your settings.
Also, please include a description how to reproduce this problem.

I do not need the complete project because that will only take more time to figure out what you have done.
Basically, I just need a small project with one page and object(s) that are relevant to your question.

Note that I cannot see what you have done based on the published page (HTML), because the software has thousands of options and millions of possible combinations.
So, there is no way to know which options you have used by looking at the HTML only.

For further details about how to share a project file, please see this FAQ:
viewtopic.php?f=10&t=82134
craigcampbell
 
 
Posts: 3
Joined: Tue Jul 16, 2024 8:10 pm

Re: MySQL CRUD not showing current records

Post by craigcampbell »

Is this what you are looking for?

http://eahl.ca/Control_Panel.wbs
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

The column values are not correct. The column should be a number. Please see the documentation.
craigcampbell
 
 
Posts: 3
Joined: Tue Jul 16, 2024 8:10 pm

Re: MySQL CRUD not showing current records

Post by craigcampbell »

Do you have a reference for the documentation?
What I've located so far was minimal.

Thanks so much. I am making progress.
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: MySQL CRUD not showing current records

Post by Pablo »

There is a PDF document included with the extension.
The PDF has the same name as the extension.
Post Reply