Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Dec 2004
    Posts
    67
    Member #
    8452
    Liked
    1 times
    Is there any way I could multiply all the values in a column? It is an integer column.
    Brian : This must be the physics department.
    Chris : That explains all the gravity.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    air coding but

    PHP Code:
    $query "UPDATE table_name SET column=coulumn*3 WHERE condition=value"
    If you want to update all rows, you will not need a where clause

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    If it's temporarily (like converting a result from a column consisting of dollars represented in pounds), you could just add whatever mathematical expression you'de like in your SELECT query.

    SELECT dollar*2 from table_name ...

    http://dev.mysql.com/doc/mysql/en/ma...functions.html
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:45 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com