You are here: Re: mysql query « All PHP « IT news, forums, messages
Re: mysql query

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация