Hi
I recive data in the following format
BMW M3 black on Business Plan 320 with 50 miles for £800.00
The data is all stored in a text field, I take the price out at the end of the field and usine the Instr and right function. which is done correctly but the i want to use the price in a calculation and it wont work, please can you tell me what is the best way to do this?






Greg K posted this at 23:17—19th October 2007.
He has: 1,601 posts
Joined: Nov 2003
I just made a test table, with one field `desc` and put your line in it. I then execute the following:
SELECT (substring(`desc`,instr(`desc`,'£')+1)*4) as VAR1 FROM `test`'and the result back from mySQL is 3200, which is correct. Can you give an example of how you are trying to do it.
-Greg
[This space intentionally left blank]
Cool Geek Supplies: www.ThinkGeek.com
shakir posted this at 06:44—27th November 2007.
They have: 13 posts
Joined: Nov 2007
Convert the price to integer. now it will be string
[="Red"]best web hosting[/] |
security software
[URL="http://www.cheap-webhosting-
review.info/HostGator.html"][="Lime"]
Hostgator Review[/][/URL] |
[URL="http://www.cheap-webhosting-
review.info/IX.html"][="Blue"]ix web hosting
[/][/URL]