import _mysql
db = _mysql.CONNECT(”hostname”, ”username”, ”password”, ”DATABASE”)
db.query('''CREATE TABLE IF NOT EXISTS users(id INTEGER PRIMARY KEY, name VARCHAR(255), email VARCHAR(255))''')
IN python, no RETURN VALUE FROM query(), but exceptions possible.
Results
res = db.store_result() #held IN client
res = db.use_result() #held IN server
res.fetchrow(max_rows)
res.fetchrow()
fetchrow() will never RETURN more than max_rows. WITHOUT a parameter the NUMBER IS 1.
Comments
0 B
|👍
/👎
0 B
|👍
/👎