tlama
tlama

Reputation: 617

How to escape a sequence argument in sql source in APSW?

I am rewriting source code from mysql to sqlite and don't know how to escape a sequence argument in APSW driver:

cur.execute("""
    select *
    from users
    where user_id in ?
""", [[1, 2, 3]])

It is definitely a very basic need and it works well in mysql driver but I cannot find any such example for sqlite (APSW) by searching internet.

Upvotes: 0

Views: 97

Answers (1)

Itai Sevitt
Itai Sevitt

Reputation: 180

This will work:

cur.execute("""
    select *
    from users
    where user_id in ?
""", ((1, 2, 3)))

Upvotes: 0

Related Questions