-
MySQL STRICT_TRANS_TABLES mode and truncated text values
I just upgraded Apache, PHP and MySQL to their current versions on my development system. After that a unit test of one of my PHP classes failed on inserting a row in a MySQL table. The test inserts text with a greater length than the maximum column length of a
VARCHARcolumn.This test fails because the new server runs with
STRICT_TRANS_TABLESmode. It means that a inserted value must be equal to the stored value or the statement fails. Without the mode setting the inserted value is truncated to the column’s maximum length. -
Building a barebones CMS
The article Building a Barebones Content Management System: An Introduction is the start of a tutorial that explains how to put a barebones CMS together with PHP and MySQL using three available APIs:
- yaapi: a programming interface that makes displaying articles on your webpage easy.
- patTemplate: a versatile templating engine that supports a wide range of features.
- patUser: a user management class that helps you with authentication, group and permission management, statistics and more.