jan-vandenberg / cruddiy

No-code Bootstrap PHP CRUD generator
http://cruddiy.com
GNU Affero General Public License v3.0
253 stars 80 forks source link

Error in creating CRUD tables #41

Open fatmondos opened 2 years ago

fatmondos commented 2 years ago

Hi, once I configure the db and go to the step when I select the table and fields I want to create I get the following error several times: "Notice: Undefined variable: column_id in /home/goingbeautiful/domains/goingbeautiful.com/public_html/reports/core/generate.php on line 378" And the same error for lines 539, 580, 582, 583, and 584 And if I continue to access the app it prints another error: "ERROR: Could not able to execute SELECT * FROM pros_prime ORDER BY desc LIMIT 0, 10. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc LIMIT 0, 10' at line 1"

I'm using PHP 7.4

Thanks in advanced

jan-vandenberg commented 2 years ago

Is column_id a primary key? Looks like there is not a primary key to sort on (value seems empty).

fatmondos commented 2 years ago

There are no column called column_id. I have a column called id and it is a primary key.

El mar., 29 mar. 2022 20:04, Jan van den Berg @.***> escribió:

Is column_id a primary key? Looks like there is not a primary key to sort on (value seems empty).

— Reply to this email directly, view it on GitHub https://github.com/jan-vandenberg/cruddiy/issues/41#issuecomment-1082209314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2MTHVN4PEBUPZK6GRLVWTVCNA2TANCNFSM5R7FXPVQ . You are receiving this because you authored the thread.Message ID: @.***>

jan-vandenberg commented 2 years ago

Can you share your table (structure)?

fatmondos commented 2 years ago

Hi, this is it, but I have the same issue in other tables.

[image: image.png]

El mar, 29 mar 2022 a las 20:15, Jan van den Berg @.***>) escribió:

Can you share your table (structure)?

— Reply to this email directly, view it on GitHub https://github.com/jan-vandenberg/cruddiy/issues/41#issuecomment-1082220895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2MTHQ2QWREJWWOOOG2NRDVCNCEZANCNFSM5R7FXPVQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Un saludo,

Daniel

fatmondos commented 2 years ago

Hi,

I managed to be free of errors while creating the pages for the table but now I have another issue, the index page of the table doesn't show any results althouh it says there are 37 results and 4 pages, I only get empty rows without any data and it only appears the icons for read, delete, update.

I edit the php tablename-index-php and I don't see anywhere where the data is echoed. In line 126 the loop begins but there is no print of the results, only the TD where the actions icons are:

while($row = mysqli_fetch_array($result)){ echo "<tr>"; echo "<td>"; echo "<a href='pros_prime_services-read.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><i class='far fa-eye'></i></a>"; echo "<a href='pros_prime_services-update.php?id=". $row['id'] ."' title='Update Record' data-toggle='tooltip'><i class='far fa-edit'></i></a>"; echo "<a href='pros_prime_services-delete.php?id=". $row['id'] ."' title='Delete Record' data-toggle='tooltip'><i class='far fa-trash-alt'></i></a>"; echo "</td>"; echo "</tr>"; }

Something is missing, isn't it?

Thanks

jan-vandenberg commented 2 years ago

I'm sorry but it's very hard for me to tell what's wrong without being to look at the code or table structure (a .sql file).

If you want me to help you, I need more details.

fatmondos commented 2 years ago

OK, what do you need?

jan-vandenberg commented 2 years ago

Preferably a table dump (a .sql file), so I can import them in my own database and run Cruddiy.

My e-mail is janvderg [at] gmail.com