mysql VARCHAR acting like INT


Posted on 16th Feb 2014 07:03 pm by admin

Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column, only integers reside (e.g., 3010101009). When I do this:

Did you know?Explore Trending and Topic pages for more stories like this.
Line number On/Off | Expand/Contract select * from table where weird_field = '3010101009'

no records are returned, even though there is a record with weird_field = '3010101009'.

However, if I do this:

Line number On/Off | Expand/Contract select * from table where weird_field = 3010101009

the appropriate records are returned. I don't think this should be the case, right? Because it's a varchar column, shouldn't the 3010101009 be quoted? It's messing up some joins I'm trying to do, and I just don't get it.

Thanks
No comments posted yet

Your Answer:

Login to answer
284 Like 49 Dislike
Previous forums Next forums
Other forums

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

Comparing two dates
Hi Guys
I have two dates I want to compare. Below is my current implementation. The problem with

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

http to https
Hi,

Is there any specific method/condition to move an http:// page to https:// ?

Module pool selction screen parameters combination logic
Hi floks,
Am new to the module pool development ,Recently i have created one program based on

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash