Re: MySQL function in a Table's Column

From: Date: Sun, 25 Nov 2001 18:05:05 +0000
Subject: Re: MySQL function in a Table's Column
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75663@lists.php.net to get a copy of this message
Well, you can certainly do this in a query ... if you have unitcost and quantity in your table you could do this: select unitcost, quantity, (unitcost*quantity) as totalsale from orders Hank On Sat, Nov 24, 2001 at 04:06:31PM -0700, Jared Howard wrote: > I'm not really sure what I should be looking for in the MySQL manual. I > basically want to make a column that will do math to other columns, like in > a spreadsheet program. Is it possible? And if so, what do I look for? > And if you can give me an example that would be great. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- Hank Marquardt <hank@yerpso.net> http://web.yerpso.net GPG Id: 2BB5E60C Fingerprint: D807 61BC FD18 370A AC1D 3EDF 2BF9 8A2D 2BB5 E60C *** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD *** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild *** Beginning PHP -- Starts January 7, 2002 *** See http://www.hwg.org/services/classes

« previous php.general (#75663) next »