[Tutor] sqlite search

Oscar Benjamin oscar.j.benjamin at gmail.com
Sun Jan 27 20:30:27 CET 2013


On 27 January 2013 18:21, Alan Gauld <alan.gauld at 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


More information about the Tutor mailing list