[PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
I'm not a 100% sure if this is the correct list for the following question, so I shall apologise beforehand if I upset any one. Now, I have a field in my database table in the following format: 100,30,443, etc. Representing prices for 52(53) weeks of the year and comma delimited. Now I need to c

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
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 -

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
-- Regards, Owen Franssen Twisted Designmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
This almost worked :p I applied your suggestion in the following way: select * from ihrproperties where region = 'Kerry' and 0 < substring_index(substring_index(rates, ',', 41), ',', -1) < 1568 But of course my prices are saved as text so is there a way to type cast the result of the substri

Re: FRe[2]: [PHP-DB] MySQL Regular expression

2003-10-10 Thread O Franssen
Thanks very much for your help Rory. :) -- Regards, Owen Franssen Twisted Designmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php