Il giorno Wed, 26 May 2004 09:20:24 -0400 (EDT), tu oh prode "H. Wade Minter" <[EMAIL PROTECTED]> hai scritto una mail. Il suo oggetto era"[sqlite] numrows":
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [Apologies if this goes to the list twice - I had email issues last
> night and couldn't tell if it went through]
>
> In DBD::SQLite, what's the proper way to get the number of rows
> returned by a query? for example:
>
> $query = "SELECT * FROM foo WHERE bar LIKE '%baz%'";
> $sth = $dbh->prepare($query);
> $sth->execute;
I had a similar problem.
I resolved in this way:
$query = "SELECT Count(*),* FROM foo LIKE ''%baz%'";
> $sth = $dbh->prepare($query);
> $sth->execute;
You will have a single record in which first column is the number of
record.
Bye,
nathanvi
--
**********************************************************************
The UNIX Guru's view of sex:
unzip; strip; touch; finger; mount; fsck; more; yes; umount; sleep
**********************************************************************
L'unica accelerazione possibile per windows: (9.81 m/s2)
pgp0ekGsyxusY.pgp
Description: PGP signature

