Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36426 > unrolled thread
| Started by | Morten Guldager <morten.guldager@gmail.com> |
|---|---|
| First post | 2013-01-08 13:45 +0100 |
| Last post | 2013-01-08 13:45 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Newbe accessing MySQL, need something like perl's prepare_cached Morten Guldager <morten.guldager@gmail.com> - 2013-01-08 13:45 +0100
| From | Morten Guldager <morten.guldager@gmail.com> |
|---|---|
| Date | 2013-01-08 13:45 +0100 |
| Subject | Newbe accessing MySQL, need something like perl's prepare_cached |
| Message-ID | <mailman.271.1357649160.2939.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
'Aloha Friends! Still quite new to python I'm trying to access a MySQL database. Being a former perl programmer I recognize much of the semantics going on. Create a database handle, compile a piece of SQL and put it into a cursor, run the query and use the result. exactly the same flow as I am used to. And it works just fine. But as programs grow larger, it is sometimes becomes a burden to compile those SQL's over and over again when they should be perfectly reusable. And implementing a "query cache" by myself seems not to be the right thing in this batteries included environment. Donno exactly what I'm looking for, but the perl equivalent is called prepare_cached. Oh, by the way, I'm using "import MySQLdb", hope that's not the most outdated, inefficient and stupid choice for a MySQL library... -- /Morten %-)
Back to top | Article view | comp.lang.python
csiph-web