Re: Re: Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 11:25, David Robley wrote: > Tim Streater wrote: >> On 11 Oct 2011 at 10:47, David Robley wrote: >>> Tim Streater wrote: On 11 Oct 2011 at 03:03, Paul M Foster wrote: > On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >> would like to be able to supply a string containing several SQL >> statements and have them all executed, thus saving the overhead of >> several calls. It *appears* that this may be how it actually works, >> but I wondered if anyone could confirm that. > The docs appear to agree that this is allowed. See: > http://us.php.net/manual/en/function.sqlite-exec.php That's the SQLite interface, though, rather than the SQLite3 one. The latter just says: "Executes an SQL query ...". >>> Not to be a smartass or anything, but what about TIAS ? >> What that? > Er, Try It And See > > A couple of minutes experimentation might have saved you the time of email, > wait for an answer ... Well, there is an sqlite3 executable that one can run to do CLI things to a database. OS X comes with that and I was also able to download the source of that program, and the SQLite C amalgamation, and rebuild it myself. It is certainly possible, with that program, to execute a sequence of semi-colon separated statements. It *doesn't* work with PHP's PDO interface to sqlite, as I found in a test program I put together; I haven't properly tested that with the sqlite3 interface. I've tried asking on the sqlite general mailing list and (to me at least), the answers are at best unclear. There is a function, part of the C interface to sqlite, that talks about a sequence of statements, but I guess ultimately it depends on how the writer of the PHP sqlite3 interface implemented it. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: [PHP] Multiple SQLite statements
Tim Streater wrote: > On 11 Oct 2011 at 10:47, David Robley wrote: > >> Tim Streater wrote: >> >>> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: > I would like to use the SQLite3 (not PDO) interface to SQLite, and I > would like to be able to supply a string containing several SQL > statements and have them all executed, thus saving the overhead of > several calls. It *appears* that this may be how it actually works, > but I wondered if anyone could confirm that. > The docs appear to agree that this is allowed. See: http://us.php.net/manual/en/function.sqlite-exec.php >>> >>> That's the SQLite interface, though, rather than the SQLite3 one. The >>> latter just says: "Executes an SQL query ...". > >> Not to be a smartass or anything, but what about TIAS ? > > What that? > > -- > Cheers -- Tim Er, Try It And See A couple of minutes experimentation might have saved you the time of email, wait for an answer ... Cheers -- David Robley Mothers are the necessity of invention -- Calvin Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 10:47, David Robley wrote: > Tim Streater wrote: > >> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >> >>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I would like to be able to supply a string containing several SQL statements and have them all executed, thus saving the overhead of several calls. It *appears* that this may be how it actually works, but I wondered if anyone could confirm that. >>> The docs appear to agree that this is allowed. See: >>> >>> http://us.php.net/manual/en/function.sqlite-exec.php >> >> That's the SQLite interface, though, rather than the SQLite3 one. The >> latter just says: "Executes an SQL query ...". > Not to be a smartass or anything, but what about TIAS ? What that? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Multiple SQLite statements
Tim Streater wrote: > On 11 Oct 2011 at 03:03, Paul M Foster wrote: > >> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >> >>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >>> would like to be able to supply a string containing several SQL >>> statements and have them all executed, thus saving the overhead of >>> several calls. It *appears* that this may be how it actually works, >>> but I wondered if anyone could confirm that. >> >> -- >> Cheers -- Tim >>> >> >> The docs appear to agree that this is allowed. See: >> >> http://us.php.net/manual/en/function.sqlite-exec.php > > That's the SQLite interface, though, rather than the SQLite3 one. The > latter just says: "Executes an SQL query ...". > > -- > Cheers -- Tim Not to be a smartass or anything, but what about TIAS ? Cheers -- David Robley I don't eat snails... I prefer FAST food! Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 03:03, Paul M Foster wrote: > On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: > >> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >> would like to be able to supply a string containing several SQL >> statements and have them all executed, thus saving the overhead of >> several calls. It *appears* that this may be how it actually works, >> but I wondered if anyone could confirm that. > > -- > Cheers -- Tim >> > > The docs appear to agree that this is allowed. See: > > http://us.php.net/manual/en/function.sqlite-exec.php That's the SQLite interface, though, rather than the SQLite3 one. The latter just says: "Executes an SQL query ...". -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple SQLite statements
On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: > I would like to use the SQLite3 (not PDO) interface to SQLite, and I > would like to be able to supply a string containing several SQL > statements and have them all executed, thus saving the overhead of > several calls. It *appears* that this may be how it actually works, > but I wondered if anyone could confirm that. -- Cheers -- Tim > The docs appear to agree that this is allowed. See: http://us.php.net/manual/en/function.sqlite-exec.php Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php