Moritz Lennert wrote:

> >> s/db.execute/db.select
> >
> > Cool.
> >
> > But I thought that both did essentially the same job? Apparently not...
> 
> No, db.select is only for selection and db.execute is for any other db 
> manipulations (update, delete, insert, create table, etc). They use 
> different functions to interact with the DB. Don't know what Radim's 
> reasoning was behind this, but I guess he had a good one :-).

A select command returns data; the others return only a status
indication. This is typically reflected in the underlying API (libpq,
sqlite, etc) having different interfaces for queries (select
statements) and other statements.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to