Newbe accessing MySQL, need something like perl's prepare_cached

  • Thread starter Morten Guldager
  • Start date
M

Morten Guldager

'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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top