티스토리 뷰
import
sqlite3
conn
=
sqlite3.connect(
"test.db"
)
cur
=
conn.cursor()
sql
=
"select * from customer where category=? and region=?"
cur.execute(sql, (
1
,
'SEA'
))
rows
=
cur.fetchall()
for
row
in
rows:
print
(row)
conn.close()
#Named
sql
=
"select * from customer where id = :Id"
cur.execute(sql, {
"Id"
:
1
})
'programming > python' 카테고리의 다른 글
python sqlite3 심플 예제 (0) | 2018.08.31 |
---|---|
db 기본 문법 (0) | 2018.08.31 |
python sqlite3 (0) | 2018.08.26 |
[Flask] sqlite3 사용예제 (0) | 2018.08.26 |
[Flask] url_for (0) | 2018.08.25 |
Comments
최근에 올라온 글
최근에 달린 댓글
TAG
- rt_sigreturn
- fastbin
- tcache
- shellcoding
- pwnable
- codegate
- glibc
- TLS
- ebp change
- SQLi
- oob
- fsop
- 해킹
- exit
- hacking
- srop
- stack reusing
- pwnable.tw
- FSB
- HackCTF
- pwable
- overflow
- heap
- fastbindup
- 본선가고싶다
- Total
- Today
- Yesterday