[thelist] Increment every value in table (MySQL)

Chris Price chris.price at choctaw.co.uk
Tue Jan 6 09:29:32 CST 2009

Hi Barry

I figured I'd have to do something like this.

If you've seen Jason Handby's reply this an atypical table so I'll be 
going for a semi automatic solution using the mySQL administrator for now.

Thanks for your help.

Barry Woolgar wrote:
>> I am looking for a query something like UPDATE table_name 
>> SET * = * x 1.35 so I don't need to know field names.
> Ah I see what you mean, if you don't mind doing it in a couple of queries
> and a bit of programming you could run a 'SHOW COLUMNS FROM table', loop
> through the results to get the field names, and build your update query on
> the fly.
> There is probably a more elegant way to go about this, which I'd be
> interested in seeing if anyone knows it


Kind Regards

  Chris Price

chris.price at choctaw.co.uk <mailto:chris.price at choctaw.co.uk>
www.choctaw.co.uk <http://www.choctaw.co.uk>

Tel. 01524 825 245
Mob. 0777 451 4488

Beauty is in the Eye of the Beholder while
Excellence is in the Hand of the Professional


 >> Sent on behalf of Choctaw Media Ltd <<


Choctaw Media Limited is a company registered in
England and Wales with company number 04627649

Registered Office: Lonsdale Partners, Priory Close,
St Mary's Gate, Lancaster LA1 1XB . United Kingdom

More information about the thelist mailing list