Code

Discussion on PHP CRUD Generator - Advanced Database Admin Panel Builder

Discussion on PHP CRUD Generator - Advanced Database Admin Panel Builder

By
Cart 1,699 sales

migli supports this item

Supported

This author's response time can be up to 1 business day.

792 comments found.

Hi,

Can the one installation of PHP CRUD Generator handle 2 databases on the same server?

Regards, Mark

Hi,

PHP CRUD Generator can handle 2 databases on the same server but you have to copy the package to 2 different places and install from each of them.

If you need anything else you’re welcome,

Gilles

Hi

I have 2 tables: books and authors (schema below).

I have created an Edit page for ‘books’ where the field ‘book_author_id’ has a select menu to choose the author_name from the ‘authors’ table.

The ‘book_author_id’ looks up the ‘author_name

That’s all good on the ‘books’ Edit page.

But, on the ‘books’ Read page, I cannot figure out how to get the ‘author_name’ to display in place of the ‘book_author_id’

There are no foreign keys in place.

Any clues would be grately appreciated.

Regards, Mark

books ----------------+ | Field | Type | Null | Key | Default | Extra | ----------------+ | id_book | int(10) | NO | PRI | NULL | auto_increment | | book_title | varchar(255) | YES | | NULL | | | book_author_id | int(11) | YES | | NULL | | ----------------+

authors -----------—+ | Field | Type | Null | Key | Default | Extra | -----------—+ | id_author | int(10) | NO | PRI | NULL | auto_increment | | author_name | varchar(255) | YES | | NULL | | -----------—+

Hi Listgnome,

Thanks for purchase.

You mentionned the key point: There are no foreign keys in place.

To display the author name instead of the author id in the book list the query must use the book_author_id as a foreign key pointing to the authors table, so you have to create this relation first in your DB:

  1. Add the relationship in your database
  2. From the generator, click the “Refresh” button, then in the dropdown choose “Refresh the database relationships”
  3. The options to display the authors names instead of the authors ids will be available, you can setup and rebuild your list.

This might help about relationships: https://www.phpcrudgenerator.com/tutorials/how-to-manage-database-relations

If you need anything else you’re welcome,

Gilles

Thank you very much Gilles. That has got me up and running :-)

Great. Thanks to you for your feedback.

Hi,

I am trying again your software if I can install it now. I just made a fresh install of the new version. Installation is a success. But when I click the OPEN THE CRUD GENERATOR NOW. The new tab has error:

This page isn’t working. florabelgroup.com.ph is currently unable to handle this request. HTTP ERROR 500

Pls help.

Thanks

Hi,

The error 500 can have several causes, you have to turn dusplay_errors On in your php configuration, then refresh your page to see the error message, that will help to understand where the error come from. Or find your php error.log and see the reported error.

After this if you still need some help you can write here or email me your ftp access and URL if you want me to have a look on your server.

Gilles

In the Error_log:

[21-Sep-2024 18:43:28 UTC] PHP Parse error: syntax error, unexpected ’|’, expecting ’;’ or ‘{’ in /home1/abetroid/public_html/quickhire/class/phpformbuilder/FormExtended.php on line 710

Thanks, it helps.

Please open your /class/phpformbuilder/FormExtended.php and make the following replacement:

// L.710
private function getIndex($i): string|false

// replace with this:
private function getIndex($i): mixed

The alternative “string|false” syntax requires php 8, you have an older php version, that why you got this error.

I’ll publish this fix in the next release.

Gilles

Bonjour,

Est-il possible d’utiliser PHPCG sur des vues ? je n’arrive pas à voir les vues disponibles …

Merci

Philippe

Non, c’est normal, j’ai déjà étudié la question. Il est en théorie possible de détecter les vues et afficher les enregistrements, mais je ne l’ai (pour l’instant) pas implémenté pour plusieurs raisons:
  • Les enregistrements ne pourraient pas être édités, ça serait un simple affichage
  • Il serait impossible d’utiliser des relations
  • Il me faudrait implémenter les vues pour chaque SGBD

Y’a-t-il une possibilité dans la version actuelle d’afficher simplement celles-ci ? C’est assez utile pour des consultations / extractions de données … (via une petite modification de code :) )

Il faudrait que tu implémentes ta propre classe PHP pour la vue, le mofdèle TWIG associé, et que tu ajoutes la vue au menu latéral: https://www.phpcrudgenerator.com/tutorials/how-to-add-links-to-custom-pages-in-the-navbar

Bonjour,

Après une installation sur 2 hébergements différents, j’ai à chaque fois la même erreur :

URL : https://xxx.com/generator/generator.php Erreur 500. Niveau logs :

AH01071: Got error ‘PHP message: PHP Warning: Undefined array key 0 in /home/xxx/php-crud-generator/generator/class/generator/Generator.php on line 403; PHP message: PHP Warning: Undefined array key 0 in /home/xxx/php-crud-generator/generator/class/generator/Generator.php on line 404; PHP message: PHP Warning: Undefined array key 0 in /home/xxx/php-crud-generator/generator/class/generator/Generator.php on line 405; PHP message: PHP Fatal error: Uncaught TypeError: phpformbuilder\\Form::addInput(): Argument #3 ($value) must be of type string, null given, called in /home/xxx/php-crud-generator/generator/generator.php on line 82 and defined in /home/xxx/php-crud-generator/class/phpformbuilder/traits/Elements.php:27\nStack trace:\n#0 /home/xxx/php-crud-generator/generator/generator.php(82): phpformbuilder\\Form->addInput()\n#1 {main}\n thrown in /home/xxx/php-crud-generator/class/phpformbuilder/traits/Elements.php on line 27’

Est-il possible de me faire un retour rapidement ?

Cordialement,

Philippe

Bonjour Philippe,

Le generator essaie de charger une table depuis la base de données, qui apparemment n’en contient pas.

Il faut simplement utiliser le CRUD Generator avec une base de données qui contient au minimum 1 table.

Si tu as besoin d’autre chose n’hésite pas,

Gilles

Merci Gilles, c’est bon. Dernière question :) est-il possible d’ajouter du code php nativement ? Merci !

Oui, les classes et templates générés par le CRUD Generator peuvent être personnalisés, tu peux aussi y ajouter des scripts.

Ceci devrait t’aider: https://www.phpcrudgenerator.com/tutorials/admin-panel-tree-structure-files-and-logic et des infos ici sur tout ce qu’on peut couramment voiloir faire: https://www.phpcrudgenerator.com/tutorials

Hello, Can your software be used to build a new postgresql database from scratch?

Hi,

PHP CRUD Generator generates your admin dashboard from your database, but it doesn’t create your tables and fields.

I tried to update, but now I get this:

Fatal error: Uncaught UnexpectedValueException: The stream or file ”/var/www/html/generator/update/update.log” could not be opened in append mode: failed to open stream: Permission denied in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146 Stack trace: #0 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write() #1 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(327): Monolog\Handler\AbstractProcessingHandler->handle() #2 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(539): Monolog\Logger->addRecord() #3 /var/www/html/vendor/visualappeal/php-auto-update/src/AutoUpdate.php(446): Monolog\Logger->notice() #4 /var/www/html/generator/update/index.php(45): VisualAppeal\AutoUpdate->checkUpdate() #5 /var/www/html/generator/generator.php(1076): require_once(’/var/www/html/g…’) #6 {main} thrown in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146

And cannot access the CRUD generator anymore

I set permissions to 777 and now I can access again, but update fails

Hi,

The error message clearly says that it can’t open & write the logfile at /var/www/html/generator/update/update.log

I can help you more if you can email me your ftp & url, but for now I cannàot say more.

Hi Migli I am getting HTTP ERROR 500 after trying to reach site from my subdomain http://crud.mydomain.com/generator/generator.php is blank.
Is there something with subdomain to do or what ? can you please help
or maybe .htaccess

Hi,

Did you open the generator whereas your database contains no table? Your database must have at least one table.

oh thank you that worked ;-)

Perfect!

I have another question. If I use a column with type ENUM in MySQL, will the views display the ids or the values?

No worries. I have discovered it already. Works nicely

And another question. I see that there is an update, but I cannot find any changelog. I would like to know which fixes/improvements are there before installing it

Hi,

The changelog is available here: https://www.phpcrudgenerator.com/documentation/index#changelog

I’ll answer your filter question within a few minutes

Thank you. I see that it says version 2.3.7 (09/2023), I guess it is 09/2024.

Yes, 2024 of course. Thanks, I made the change

When I create a filter to select, for example, the records with a boolean value of 0, it shows all the records. If you select 1, if filters the records correctly. It also happens if you try to find records with an empty field

Damn, you’re right!

A file was forgotten during the update. I’m finishing up a few other changes and then publishing a new version. Unless I’m mistaken, everything should work fine. Thanks for your patience.

Hi, Gilles. I have seen and applied 2.3.10. The filter works now! Thank you!

Great, thanks for your feedback

Hi, I bought PHP CRUD Generator but when I try to configure with the Production server, I always received an error that remote connecetion does not work, even when I tried to test the connection an always receives the message that connection was succesfully I am using Namecheap as hosting provider, please can you help me to solve this issue.

Hi,

I am aware of the problem and am currently working on it urgently. It’s due to an internal change at my host, and we’re closely studying it together. At this time the problem is largely solved, but not yet 100%. Everything should be back to normal in the next few hours.

The license verification system has always been extremely reliable over the years,

Thank you for your patience and understanding.

Gilles

Hi Gilles,

I tried starting from scratch. remove the whole folder and copied a fresh copy of the installer.

I get this error on STEP 2:

Unfortunately, installation failed because of this reason: An unknown error occurred (probably database failure or unauthorized modification of data)

I checked and the installer can’t create the table user_data which I already deleted also before installing.

Thanks, Herbert

Hi,

I already replace the file from original Download but still same error.

Table user_data not found

Replace /home1/abetroid/public_html/nanaypartylist.com/class/phpformbuilder/database/db-connect.php original file to reset your installation

Connection to remote server can’t be established

I just want to fresh copy to start the project. Thanks

Hi Herbert,

Please read “How to clean up your installation” here: https://www.phpcrudgenerator.com/tutorials/how-to-uninstall-reinstall-php-crud-generator

If you follow the process (delete your user_data” table and restore the original db-connect.php) you shouldn’t encounter any problem.

Also double-check that the MySQL user has the appropriate rights to create tables.

If you still have any problem please email me and send me the information I need to install: purchase code, DB connection information, FTP access and if possible PHPMyAdmin access.

Thanks

I have already bought PHP Form Build and am using it for my project. Is there a way i can implement both on the same project without conflict? Also, do i get a discount?

Hi,

If you buy PHP CRUD Generator you’ll have to remove PHP Form Builder from your project and use the version which is included with PHP CRUD Generator.

I cannot make a discount for a single purchase, but I can allow more installations with your license, which means that you’ll be able to use PHP CRUD Generator on 2 projects instead of one with a sibngle purchase.

Gilles

Hi.

I have a Birth Date field. In the Date Picker, i need to scroll to all the months just to get to the correct year and it is taking to long to encode Birth Date. Is there a way to scroll to the years so encoding will be fast?

Also, how can I search a name if the First Name and Last Name are two different Field?

Hi,

This is the existing code when I re save it in Form Builder:

// birthdate— $form->addPlugin(‘pickadate’, ’#birthdate’); $form->addInput(‘text’, ‘birthdate’, ’’, ‘Birthdate’, ‘data-format=mm dd yyyy, data-format-submit=yyyy-mm-dd, data-set-default-date=true’);

To have a text input with a pattern, replace everything with:

$form->addInput('text', 'birthdate', '', 'Birthdate', 'pattern=(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31)), placeholder=yyyy-mm-dd, required');

You can replace the pattern with another from https://www.html5pattern.com/Dates

If you want me to help you more with code please email me your details, it’ll be more practical for me and a lot more efficient.

Thanks

Hi. I have sent a PM. Thanks

d34d

d34d Purchased

I can no longer recommend PHPCG due to:

- Basic functions like adding rows trigger license checks, causing failures with “Can’t connect to licensing server” errors when the licensing server is slow or unresponsive.

- While the creator is very responsive and initially resolved bugs, promised updates to fix these issues in a new release haven’t materialized.

- Setting up on a new server requires going through the same troubleshooting process again, which is not feasible for production work.

To the developer: Consider a licensing system that doesn’t interrupt core functionality, and follow through on promised bug fixes.

Hi,

About the license checks issue:

There has been an act of sabotage on the Internet network in France, affecting many servers. The network players are at work, so unfortunately there’s nothing to do but wait for services to be restored.

News about my hosting provider Planethoster is posted here: https://planethoster.live/threads/incident-reseau-paris-fr-network-issue-paris-fr.6719/

I hope you can understand that the whole network is affected, many users of many tools have the same problems.

About the updates & releases

If you have some requests you just have to contact me, I can publish a release with the latests changes if you ask for it.

If you need anything else you’re welcome,

Gilles

d34d

d34d Purchased

License checks for basic functions is a terrible design. Consider a licensing system that doesn’t interrupt core functionality. About the bugs, you’ve already replied by email that you’re busy with a different update when I contacted you.

If you email me I’ll find our previous exchange and try to help.

Hello support, readonly not working in edit form

Hi,

Please provide me some details: I need your url, ftp and purchase code. You can email me here: miglisoft contact

Thanks

hi, i have installed PHP CRUD generator in XAMP. after i try to open the generator i am getting following error. and the page is not loaded properrly. could you please help with this issue.

Warning: Undefined array key 0 in C:\xampp\htdocs\generator\class\generator\Generator.php on line 403

Warning: Undefined array key 0 in C:\xampp\htdocs\generator\class\generator\Generator.php on line 404

Warning: Undefined array key 0 in C:\xampp\htdocs\generator\class\generator\Generator.php on line 405

Hi,

Thanks for purchase.

The generator didn’t find any table in your database. You have to add at least one table first.

Buenas tardes! Estoy necesitando conectar php crud generator a sqlsrv (Sql server) me podría indicar que driver utilizar y si tengo que configurar algo en especial.

muchas gracias!!

Hi,

Thanks for purchase.

Sql server uses the PHP PDO_SQLSRV driver, which is not currently implemented with PHP CRUD Generator. I can only suggest you to migrate your database to another DB Engine, got no other solution for you, except if I make this development for you but it might be a bit expensive …

Gilles

Hello Support, Is there a log tracking user actions such as additions and deletions of data?

Hello,

No there’s not. You can setup your own but this is not a built-in feature.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey