Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

torque/mysql/boolean??

Status
Not open for further replies.

philipina

Programmer
Aug 2, 2004
4
LU
Hello,

I'm using apache torque to generate my mysql database layout.
In my torque definition I have some field defined as BOOLEAN.
As mysql does not supported boolean, torque generates a layout by replacing boolean by INTEGER.
The problem is that after creating my DB, if I do a dump and open my dump file I can see that this fields are marked as INT(11).
I don't understand why it is INT(11) and not INT(1). Is is a default value?

Thanks in advance for your explanations.

-------------------------
Philipin Alain

-------------------------
 
for numeric datatypes, the number in parentheses has nothing to do with the size of the column

INT(1) can hold exactly the same range of numbers as INT(10) or INT(937)

for boolean, you'd want TINYINT

r937.com | rudy.ca
 
Ok, then I have to check why torque is setting it to INT instead of TINYINT.

Thank you.

-------------------------
Philipin Alain

-------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top