From: Raimon Fs Date: 2009-02-25T16:07:14+09:00 Subject: Re: updating row with pg => success or failure Choi, Junegunn wrote: > Have you tried "row_update.cmd_tuples()"? ntuples() is only for query > results. Use cmd_tuples instead for updates, inserts and deletes. From the RDoc: --------------------------------------------------------- res.cmd_tuples() → Fixnum Returns the number of tuples (rows) affected by the SQL command. If the SQL command that generated the PGresult was not one of: INSERT UPDATE DELETE MOVE FETCH or if no tuples were affected, 0 is returned. Actually, my SQL involved an UPDATE statement, and for what I understand, this command is only usefull for SELECT statements ? But as you suggest, it's working and I'm getting the number of rows affected for my update :-) are the docs wrong, I'm understanding them in the wrong way ? thanks! regards, r. -- Posted via http://www.ruby-forum.com/.