473,372 Members | 1,277 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

how to do a boolean value in MySQL

Hi Gurus

What is the best way to store a boolean value in a MySql table (e.g. true or false) AND ( ;-) am I asking this in the right
newsgroup (I could not find one for MySQL)

Thank you

- Nicolaas
Jul 17 '05 #1
2 2623
From the MySQL manual:

BOOL
BOOLEAN
These are synonyms for TINYINT(1). The BOOLEAN synonym was added in MySQL
4.1.0. A value of zero is considered false. Non-zero values are considered
true. In the future, full boolean type handling will be introduced in
accordance with standard SQL.

"WindAndWaves" <ac****@ngaru.com> wrote in message
news:2R*******************@news.xtra.co.nz...
Hi Gurus

What is the best way to store a boolean value in a MySql table (e.g. true
or false) AND ( ;-) am I asking this in the right
newsgroup (I could not find one for MySQL)

Thank you

- Nicolaas

Jul 17 '05 #2
WindAndWaves wrote:
Hi Gurus

What is the best way to store a boolean value in a MySql table (e.g. true or false) AND ( ;-) am I asking this in the right
newsgroup (I could not find one for MySQL)

Thank you

- Nicolaas


The answer is here: http://dev.mysql.com/doc/

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rhio Barnhart | last post by:
I am a MySQL/PHP beginner and have gotten further than I expected. I am developing a web based library catalog. After getting everything configured, I have been working on various query formats. ...
0
by: Dan Anderson | last post by:
I ran a search through the mySQL manual and google and could not find a satisfactory answer. Does mySQL support the declaration of a boolean data type? Currently I am using VARCHAR(6)s with...
2
by: Bruce D | last post by:
I'm working with VB.NET and I'm pulling data from MySQL. .NET is looking for a boolean value...and I'm wondering what type I should make the field in my database. Any help is appreciated. ...
1
by: leegold | last post by:
Show full header Is there any way to make relevance when using boolean mode more useful? If not, are there plans in the Fulltext development "todo" for making it useful? I'm thinking of just...
10
by: Henri | last post by:
In java for instance there's a way to use booleans as objects and not as value types. I would like to do the same in VB.NET so that I can check if the boolean has been explicitely defined (is not...
0
by: phillip.s.powell | last post by:
SELECT id, student_first_name, student_last_name, major, minor , MATCH(major, minor) AGAINST ('"mechanical engineering"') AS score FROM students WHERE MATCH(major, minor) AGAINST ('"mechanical...
0
by: Malte | last post by:
Hello there, We got a problem atm with our 20k database. Everytime we search for sth. with double quotes it takes much more longer than without. Here is what we did: mysql> SELECT COUNT(*)...
18
by: Greg Scharlemann | last post by:
I'm having an issue passing a boolean to the constructor of an object. For some reason, if I pass false into the constructor, it doesn't register. If I pass an integer 0, it does. PHP 5 Code...
3
by: Brian Smither | last post by:
$result = $class->method(); //returns an array of associative arrays if($result==TRUE) $cat=$result; I've been converting a class from an original and the original class *apparently* returned an...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.