FRe[2]: MySQL Regular expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> HI Owen
>
> I am not sure about strcmp - I have never used it on numbers before..MySQL
> 2nd Ed by DuBois <PLUG> Which is well worth the money - makes me look
> intelligent </PLUG> says that strcmp sorts lexically...and to be quite
> honest, I need to go look that up...... but I think it will work...
>
> However, using the code from your previous comment, you can try casting
your
> result as an unsigned integer like so (if yourMySQL is ver 4.0.2 or up)...
>
> select * from ihrproperties where region = 'Kerry' and 0 <
> CAST(substring_index(substring_index(rates, ',', 41), ',', -1) AS UNSIGNED
> INTEGER) < 1568
>
> If you don't have 4.0.2 - I would suggest you try strcmp and see ...
>
> Rory McKinley
> Nebula Solutions
> +27 82 857 2391
> rorym@nebula.co.za
> "There are 10 kinds of people in this world,
> those who understand binary and those who don't" (Unknown)
> ----- Original Message ----- 
> From: "O Franssen" <twisteddesign@eircom.net>
> To: "Rory McKinley" <rorym@nebula.co.za>
> Sent: Thursday, October 09, 2003 6:22 PM
> Subject: Re[2]:  MySQL Regular expression
>
>
> > Actually in response to my previous comment, would the following
> > achieve wwhat I want?
> >
> > ... and strcmp('$foot_budget', substring_index(substring_index(rates,
',',
> $selecteddate), ',', -1)) = -1 and strcmp('$head_budget',
> substring_index(substring_index(rates, ',', $selecteddate), ',', -1)) = 1
> >
> > -- 
> > Regards,
> > Owen Franssen
> > Twisted Design
mailto:twisteddesign@eircom.net
> >
> >
> >
> >
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux