"Catching" rows affected
"Catching" rows affected
От:
Torbjörn Andersson <tobbe@embryo.se>
Дата:
I have a function that shows a set numbers of records from a result at a time. Under the rows I indicate how many pages there are. To achive this the same query is run twice. Once to get the content and once with COUNT to get the number of records. This seems very wasteful. Is there a way to "catch" the number of rows affected? In psql the number is indicated below the result for no apparent extra cost. Using 7.2 on Debian with Perl. Best Regards Torbjörn "Toby" Andersson --------------------------------------------------- Embryo Communication tel: +46 (0)31 774 39 11 Kungsgatan 7a fax: +46 (0)31 774 39 29 S-411 19 Gothenburg mob: +46 (0)708 30 70 04 Sweden web: http://www.embryo.se/ --------------------------------------------------- "There are 10 kinds of people. Those who speak binary and those who don't"