Posted by Rik on 10/13/42 11:32
Stefan Rybacki wrote:
> mcyi2mr3@lycos.co.uk wrote:
>> hi all!
>>
>> how do u make a mysql field automtaically become the value of another
>> field multiplied by a constant? (without using php if possible)
>>
> Do you mean permanent? Use a View. If you just need it in a query do
> something like this:
>
> SELECT *, (field*constant) as calculatedField FROM table
Could be done, but keeping calculated fields permanent in your db is (most
of the time) bad db-building and/or a waste of space. I'm curious why you'd
want to have this calculated field in your db in the first place?
Grtz,
Rik
Navigation:
[Reply to this message]
|