Tag Archives: Database

Storing the settings into database

Today I would like to show you how I am storing and fetching the settings for my applications in CakePHP. The reason why I am doing this is pretty obvious – once the application is complete and installed it’s better to have settings such as

  • How many rows per page to show in the paginated table
  • Where is the upload dir for the files
  • What is the Date format used in the application

And many other.
Continue reading

CakePHP and Character Set in the Database

Today I found something in the CakePHP which saves me a lot of effort when I need to migrate the database as well as searching for non-English characters from the Database. What is the story:
I had 2-3 projects build with Cake which were for non-English environments. That means the localization of the projects as well as storing proper data into DB with proper encoding. The current project is the same.

In these projects I saw that the data was not stored properly in the MySQL. From the Cake project interface everything looks ok, but when I open phpMyAdmin – the chars looked like strange symbols /not ??? neither ӗ&୶/. So far I ignored this because as far it is working from CakePHP interface for me everything was ok.
Continue reading