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:

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

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

PHP and MySQL on intranet?
Is it possible to use both these on an intranet network?

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

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