473,397 Members | 1,949 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,397 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 2625
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.