Re: count rows without count(*)
Ing. Branislav Gerzo wrote:
Hi all,
I get data from DB with:
while (my ($id, $post_text) = $getpost->fetchrow_array) {
is there a way how much columns are selected wihout select (fetch)
them all, or using count(*) function ?
In the general case, no.
DBI provides the rows() method:
my $rows = $sth->rows;
But for a SELECT query, most drivers don't return the correct value until
all the rows have been fetched. Some drivers may return a proper value after
execute() is called, so you have to check your DBD driver documentation.
If you simply want a row count, using SELECT count(*) is the proper
approach.
.
Relevant Pages
- Re: Fuzzy display - cant change it!
... If you just paid to have the OS installed, take it back and have them install the proper drivers as they should have done before you got it back. ... the proper drivers for your installed video adapter/chip. ... (microsoft.public.windowsxp.general) - Re: Display on screen
... If it shows to be a Default Standard VGA device, you'll need to reinstall/update your video drivers for the video adapter/chip. ... If they do not have proper drivers for your device, go to the manufacturers support site of the video adapter/chip to download/install the latest updated drivers per their instructions for your device. ... If you do not know the make/model of the device video adapter/chip: ... Go to the manufacturers Support> Download site and download the proper drivers for your device. ... (microsoft.public.windowsxp.general) - Re: Display on screen
... your video drivers for the video adapter/chip. ... If they do not have proper drivers for your device, ... If you do not know the make/model of the device video adapter/chip: ... Create a new folder named Everest and extract the contents of the download to ... (microsoft.public.windowsxp.general) - Re: [PATCH]: New implementation of scsi_execute_async()
... This patch based on the previous patches posted by Tejun Heo. ... its target drivers, which are, basically, SCSI drivers, can deal only with SGs, ... The allocation of scsi_io_context is unavoidable, ... use a proper structure with the needed types. ... (Linux-Kernel) - Re: Dynex CD/DVD writer-recorder drives in XP: ID Problems
... There were no "Drivers" per se, but the hardware references were removed from ... >> The drive is being properly recocnized by the BIOS in the setup ... Check the registry for upperfilters and lowerfilters and reboot ... > in my own proper atmosphere. ... (microsoft.public.windowsxp.general) |
|