Re: [PHP] calculate a varchar

2007-12-06 Thread Richard Lynch
I won't say you CAN'T do it (you can with eval) but you'd be WAY better off to use some kind of exchange rate field that you can change frequently instead of cramming formulas into the field. If eval is the answer, you are probably doing something wrong. You may also want to store everything as

Re: [PHP] calculate a varchar

2007-12-04 Thread Zoltán Németh
2007. 12. 3, hétfő keltezéssel 15.00-kor Andrew Ballard ezt írta: On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store

[PHP] calculate a varchar

2007-12-03 Thread John Taylor-Johnston
Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a price, I would like to enter a calculation. (24*2.2)+(24*2.2*.1) 24

Re: [PHP] calculate a varchar

2007-12-03 Thread Daniel Brown
On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a

Re: [PHP] calculate a varchar

2007-12-03 Thread Richard Heyes
Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a price, I would like to enter a calculation. (24*2.2)+(24*2.2*.1) 24

Re: [PHP] calculate a varchar

2007-12-03 Thread Jim Lucas
Daniel Brown wrote: On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar,

Re: [PHP] calculate a varchar

2007-12-03 Thread Andrew Ballard
On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a