Useful MySQL Routines

  • Thread starter Lawrence D'Oliveiro
  • Start date
L

Lawrence D'Oliveiro

Tino said:
Why is that specific to mysql?

Because that's all I've used so far. Though sqlite looks interesting for
single-user stuff...
Btw, the bulkinserter could be better done by using executemany
and select usefull batch sizes.

Hmm, I've never bothered with executemany. The code as written copes
comfortably with 10,000 records or so.
If you allow query construnction
better don't forget appropriate quoting of table- and column names
too to be on the safe side.

Hmm, I never worried about that, because I was I tried to be careful in the
names I chose. And I've never allowed object names to come from user input
:).

Besides, how do you deal with characters that are still illegal when quoted
<http://dev.mysql.com/doc/refman/5.0/en/identifiers.html>?
 
T

Tino Wildenhain

Lawrence said:
Because that's all I've used so far. Though sqlite looks interesting for
single-user stuff...

There are other more powerfull free alternatives to MySQL as well :)
Hmm, I've never bothered with executemany. The code as written copes
comfortably with 10,000 records or so.

Would be interesting to see the difference. However executemany
would be much more portable - and as I see it transfers at least
a bit less data over the wire.
Hmm, I never worried about that, because I was I tried to be careful in the
names I chose. And I've never allowed object names to come from user input
:).

Not you, but if others use it, it might be that they don't see a problem
and then - oops :)

Besides, how do you deal with characters that are still illegal when quoted
<http://dev.mysql.com/doc/refman/5.0/en/identifiers.html>?

Don't know. I personally avoid dealing with mysql altogether (I mean,
commands hidden in sql comments? Heaven! :)

Cheers
Tino
 

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
474,292
Messages
2,571,494
Members
48,183
Latest member
GarfieldBa

Latest Threads

Top