티스토리 뷰
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
- pwable
- 본선가고싶다
- tcache
- rt_sigreturn
- 해킹
- glibc
- overflow
- fastbindup
- srop
- TLS
- pwnable
- shellcoding
- stack reusing
- SQLi
- ebp change
- fsop
- FSB
- exit
- pwnable.tw
- HackCTF
- hacking
- codegate
- heap
- fastbin
- oob
- Total
- Today
- Yesterday