Skip to content
  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

zen of coding

holistic web development

  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members
  • Home
  • 2008
  • October
  • 6
  • CakePHP + MySQL + Tinyint(1) = Confusion
CakePHP

CakePHP + MySQL + Tinyint(1) = Confusion

October 6, 2008 vladko

Just a quick note to point out that CakePHP fakes a BOOLEAN field in MySQL by using tinyint(1). MySQL doesn’t have a native support for BOOLEAN.

Therefore if you attempt to save some value other than 0 or 1, CakePHP will not allow you to do that (instead it will just save 1). The easiest way to get around this is to make your field tinyint(2), as one option.

FYI, supporting ticket: https://trac.cakephp.org/ticket/3903

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…

Related

Related Posts

php mvc frameworks and microservices
CakePHP Design Docker Frameworks Laravel Lumen Microservices MVC Symfony Zend

PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)

December 31, 2017December 5, 2020 vladko
CakePHP Devops Docker Microservices MVC Open source

The State of PHP MVC Frameworks in 2017 (Laravel, Symfony, CodeIgniter, CakePHP, Zend)

February 27, 2017January 11, 2018 vladko

Post navigation

Previous: Sharing CakePHP session with another app
Next: Introduction to CakePHP features (build an app in less than 15 minutes)

New Posts

  • I don’t bother with “whiteboard interviews”.
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Case study: building a better search with Algolia and Lumen PHP
  • The State of PHP MVC Frameworks in 2017 (Laravel, Symfony, CodeIgniter, CakePHP, Zend)
  • The great PHP MVC Framework Showdown of 2016 – (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)

Top Posts & Pages

  • Case study: building a better search with Algolia and Lumen PHP
  • Book review: CakePHP Application Development
October 2008
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Sep   Nov »
All Rights Reserved 2024.
Proudly powered by WordPress | Theme: Fairy by Candid Themes.
%d