Re: [sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Tim Streater
On 23 Oct 2013 at 15:02, Simon Slavin wrote: > On 23 Oct 2013, at 1:15pm, Tim Streater wrote: > >> HmmmOK. I'm therefore making a second attempt to use the sqlite3 PHP >> interface in my application instead of PDO. There will be about 35 modules to

Re: [sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Simon Slavin
On 23 Oct 2013, at 1:15pm, Tim Streater wrote: > HmmmOK. I'm therefore making a second attempt to use the sqlite3 PHP > interface in my application instead of PDO. There will be about 35 modules to > alter so I hope I can work through any issues. Sorry to put you to

Re: [sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Clemens Ladisch
Tim Streater wrote: > select count(*),x,y,z from sometable where …; > > or is that a bad idea? An aggregate function prevents you from getting the individual records: sqlite> create table sometable(x,y,z); sqlite> insert into sometable values (1,2,3), (4,5,6); sqlite> select count(*),x,y,z

[sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Tim Streater
On 22 Oct 2013 at 09:11, Simon Slavin wrote: > If you are writing code specifically intended for use with SQLite (like your > library was meant to be) then please use PHP's sqlite3 library rather than the > PDO. The advantage of using PDO is that if you transfer from one