List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 18 2001 5:30pm
Subject:Re: Type conversion (String -> Int)
View as plain text  
On Wed, Apr 18, 2001 at 01:22:21PM -0400, Will Seitz wrote:
> Hi,
> I am probably missing something obvious in the documentation, but how do I
> convert a string to an integer in mysql. I am sorting on a substring
> (String-Number) and want the substring sorted as an integer and not a string.

Add "+0" to the expression.

> 
> database, sql, query
> 
> Thanks,
> -Will Seitz
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread71782@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Thread
Type conversion (String -> Int)Will Seitz18 Apr
  • Re: Type conversion (String -> Int)Paul DuBois18 Apr
  • Re: Type conversion (String -> Int)Gerald Clark18 Apr