Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

No data to display

Questions related to using nuBuilder Forte.
Post Reply
olim
Posts: 1
Joined: Sun Nov 06, 2022 1:33 pm

No data to display

Unread post by olim »

Hello people. I've been struggling with this wonder of the world for a month now, and I can't get him to at least show the records, let alone further. I downloaded all the settings, see what I'm doing wrong?
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: No data to display

Unread post by kev1n »

Hi,

Is the Primary Key of "Contacts" correct?

In MySQL, using [First Name] with square brackets is not the correct way to reference a column. Square brackets are used in Microsoft SQL Server (T-SQL) and not in MySQL.
In MySQL, you should use backticks (``) to quote column names if you need to escape reserved words or use special characters.

Currently, Edit forms do not support column names containing spaces. However, this functionality may be implemented in future updates.


To verify the contents of the User table, which appears empty, follow these steps:

Click on the "Options Menu" and select "Form Info".
Run the provided SQL query in phpMyAdmin to see if any rows are returned.
This will help determine if the the query returns any rows or if the issue lies elsewhere.


PS:
Using a primary key like First Name is not a good choice for several reasons:

Uniqueness: First names are not unique, and multiple individuals can have the same first name. A primary key must be unique to uniquely identify each record in the table.

Immutable: Ideally, primary keys should not change over time. However, it's possible that a person may legally change their first name, which would require updating the primary key and potentially causing issues with foreign key references in related tables.

Avoid special characters and spaces: It's best to avoid using column names with spaces or special characters, as it can lead to confusion and potential errors when writing SQL queries. In MySQL, you should use backticks to quote column names containing spaces, but it's better to avoid them altogether.

A better choice for a primary key would be an auto-incrementing integer column (e.g., id) or a universally unique identifier (UUID) if you need a more globally unique identifier. These options ensure uniqueness, immutability, and simplicity in your table schema.
Post Reply