On 27 January 2013 18:21, Alan Gauld <alan.ga...@btinternet.com> wrote: > On 18/01/13 18:11, Roger wrote: > >> At the moment this works to search for everything beginning with A >> sql = "SELECT * FROM plants WHERE genus LIKE 'A%'"; >> cursor.execute(sql); > > > SQLlite supports a form of format string where you put in some magic > charactrs then provide arguments which SQLLite will substitute in your SQL > statement. > > You can see examples of that in the database topic in my tutorial: > > file:///home/alang/Documents/HomePage/tutor/tutdbms.htm
You might have better luck using this link: http://www.alan-g.me.uk/tutor/tutdbms.htm > > Look at the address book example near the end for the 'Find Entry' feature, > and definitely read the 'word about security' subheading for the correct way > to do it! Oscar _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor