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

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script.
<

DirectoryIterator and Hacked Website
Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've

Running a cron job through PHP/Apache?!
Hello all,
I have a PHP script which makes a cron file from user input. When i try to run the cro

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

Progress bar for webpage
Hi,
I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Mi

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them

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