Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8321613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:04:51+00:00 2026-06-08T23:04:51+00:00

I was confused, when I figured out that setting value to 0 actually picks

  • 0

I was confused, when I figured out that setting value to 0 actually picks some row. O_o
0 is number, not a string…
It’s something i didn’t knew? Some specific feature of mysql or i’m doing something wrong?

Here is query:

SELECT * FROM contacts WHERE owner=0

The result is:

contact_id,owner,contact
10,d9659deb29f21dcf468783f1e7f52aa2b2ab6b48,7d1d00cd5cc06c27b3bcbefa8b4aeeb16bdec14e

Here is test dump:

-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.8 - Source distribution
-- Server OS:                    Linux
-- HeidiSQL version:             7.0.0.4053
-- Date/time:                    2012-08-02 11:05:48
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;

-- Dumping database structure for test
CREATE DATABASE IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `test`;


-- Dumping structure for table test.contacts
CREATE TABLE IF NOT EXISTS `contacts` (
  `contact_id` int(10) NOT NULL AUTO_INCREMENT,
  `owner` varchar(40) DEFAULT '',
  `contact` varchar(40) DEFAULT '',
  PRIMARY KEY (`contact_id`),
  KEY `owner` (`owner`),
  KEY `contact` (`contact`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- Dumping data for table test.contacts: ~2 rows (approximately)
/*!40000 ALTER TABLE `contacts` DISABLE KEYS */;
REPLACE INTO `contacts` (`contact_id`, `owner`, `contact`) VALUES
    (9, '7d1d00cd5cc06c27b3bcbefa8b4aeeb16bdec14e', 'd9659deb29f21dcf468783f1e7f52aa2b2ab6b48'),
    (10, 'd9659deb29f21dcf468783f1e7f52aa2b2ab6b48', '7d1d00cd5cc06c27b3bcbefa8b4aeeb16bdec14e');
/*!40000 ALTER TABLE `contacts` ENABLE KEYS */;
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:04:52+00:00Added an answer on June 8, 2026 at 11:04 pm

    The owner ‘7d1d00cd5cc06c27b3bcbefa8b4aeeb16bdec14e’ is started with a number ‘7…’, MySQL converts this value to 7, we have 7 = 0 – FALSE.

    The owner ‘d9659deb29f21dcf468783f1e7f52aa2b2ab6b48’ is started with a char ‘d…’, MySQL converts this value to 0, so 0 = 0 – TRUE.

    This is how MySQL converts strings to numbers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After thinking that I finally figured git out, I'm now finding myself super-confused about
Im running into this error that I can't work out Im writing some code
I have recently figured out that I haven't been using regex properly in my
Mildly confused. I have a combobox that is databound to a list of strings.
Very confused here, trying out the yuicompressor on a simple javascript file. My js
Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray
I have this class called Hero that has the following attributes. String is for
I have been trying to create a web service out some python scripts, and
I'm learning currently php/mysql and I'm confused about this bit. After some heads scratching
I have been playing around with haskell and I found out that if I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.