8 messages in com.mysql.lists.pluspluschange everything in a table
FromSent OnAttachments
Charles Ouimet24 May 2001 13:38 
Thomas Engman25 May 2001 08:14 
Charles Ouimet25 May 2001 09:22 
Denis Rampnoux26 May 2001 02:57 
TdC26 May 2001 09:05 
Charles Ouimet28 May 2001 03:58 
Benjamin Pflugmann28 May 2001 05:43 
Charles Ouimet28 May 2001 05:46 
Subject:change everything in a table
From:TdC (td@lomag.net)
Date:05/26/2001 09:05:52 AM
List:com.mysql.lists.plusplus

Hey,

is there an easy way to change 1 field in every row of a table to the same value? i'm having some trouble doeing this :( and the example doesn't exmplain alot so i dun fully understand it right now i'm trying with Connection con(use_exceptions); con.connect(db,dbhost,dblogin,dbpass); Query query = con.query(); query << "select * from servers"; Result res = query.store(); Result::iterator i; for (i = res.begin(); i != res.end(); i++) { servers row = res[0]; servers row2 = row; row.spliton = 1; query.update(row2, row); query.execute(); }