PHP Classes

TINYINT wrongly displayed as checkbox

Recommend this page to a friend!

      DrasticTools  >  All threads  >  TINYINT wrongly displayed as checkbox  >  (Un) Subscribe thread alerts  
Subject:TINYINT wrongly displayed as checkbox
Summary:"tinyint(3) unsigned" field in MySQL is rendered as checkbox
Messages:2
Author:Cristian Grigoriu
Date:2008-05-14 20:20:54
Update:2008-05-15 06:14:14
 

  1. TINYINT wrongly displayed as checkbox   Reply   Report abuse  
Picture of Cristian Grigoriu Cristian Grigoriu - 2008-05-14 20:20:54
There are no problems with INTEGER, though. What's the deal with TINYINT?

  2. Re: TINYINT wrongly displayed as checkbox   Reply   Report abuse  
Picture of dd dd - 2008-05-15 06:14:14 - In reply to message 1 from Cristian Grigoriu
> There are no problems with INTEGER, though. What's the deal with TINYINT?

That's correct. TINYINTS are rendered as a checkbox (because there is no boolean type in MySQL). All other numeric values are rendered as numerics.
So use TINYINT for checkboxes and use another numeric type (f.i. integer) if you want to display / edit numerics.