Discussion – Lesson 7 - Database wrapper
BackComments
4 messages from 14 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Comments
Great, I'm glad it works! The comments are not part of the original course, but you can always create a thread in our forums if you need any help - https://www.ict.social/php/php-forum.
Finally all is working correctly, I want to share the throubleshooting for
helping other people with similar issue: I adequated the format of the timestamp
just declaring a variable with the date php function and created a function for
extract the last article id in my commentmanager model, then I add +1 to this
var in the commentcontroller for maintain the original logic, I use this value
to insert the id value when I create a new comment. I observed that some web
servers like xampp fill the id field calculating the value through the auto
increment but others like apache2 may not interact like I expect with mariadb
and gives you an error if you pass an empty ('') value. This does the trick
Thanks for all the support David!
If U want to use PDO and get the chance to change db engine in the future in
Ur apps don't put the names of tables and columns in apostrophes in SQL queries
BTW This is the best MVC+Router in PHP tutorial I've ever seen.
4 messages from 14 displayed.