Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
myrworld

Off Topic: Python & MySQL, anybody able to help?

Recommended Posts

Hey'a,

I'm trying to use the MySQLdb extensions to Python to allow me to communicate with a MySQL database. After reading the far too brief documentation, I am unable to figure out how I would get the data from the result-set after cursor.execute("""QUERY""", (tuplestuff)) It's totally throwing me for a loop. I think it might have something to do with my lacking knowledge of object-oriented programming, but as many people here often work on source-ports, and likely the OOP C++, I'm hoping someone might be able to help explain things to me.

Here's a link to the documentation: http://sourceforge.net/docman/display_doc.php?docid=4664&group_id=22307

Thanks a million in advance,
-RCM

Share this post


Link to post
fraggle` said:

Ask doomboy, he'll know!

No he's only into assembly-based web servers.

Share this post


Link to post
Lament said:

C++ is gay.
From what I heard, SoMOS won't even support it.

No, SoMOS will use CSS for programming, only.

Share this post


Link to post
Fredrik said:

No, SoMOS will use CSS for programming, only.

Isnt CSS illegal? I heard you could use it to copy DVDs!

Share this post


Link to post
fraggle` said:

Isnt CSS illegal? I heard you could use it to copy DVDs!

Heh that reminds me of something. A couple of days back, I were at a store and a guy walked up to me, pointed at the DVD section and asked me what that 'DVD' thing was. I told him that it was like CD's but for movies. He asked me what a CD is. Heh.

Share this post


Link to post
Lazer said:

Use asp to communicate with databases. You can learn a ton of stuff about it at http://www.brinkster.com.


Uh huh, read below:

Lament said:

HAHAHAHAHAHAHAHHHAH HA HAH HH asp LOLOLOLOLOLOLOLLOLOLO


Unfortunately I must concur. If I wanted a simple scripting engine that only runs on Microsoft based servers or slowly runs with a shell server that doesn't even allow for ASP's native Visual Basic to be used on a *nix system, I would use ASP. However, I already have a perfectly good web scripting language that I'm fluent in, PHP. Perhaps you've heard of it? It's that really popular and easy to learn language that isn't proprietary, out runs ASP, has better compatibility with databases, and in general would <bleep> on ASP. Just a friendly note, not meant to be personal against you, Lazer, just felt an education on what ASP really is was in order. ;)

Back to my question, however, how do I link Python pull the info out a MySQL query performed with Python. I wish to use Python to do this for a script I am creating that runs for the purpose of generating a socket server from which to serve content to Flash. Beyond that, I also intend to use Python to create small programs that can run under the Windows environment and access MySQL using ActivePython and MySQL for Windows. To do this, however, I need the help that you guys provide, which is to help me, if you can, figure out how to get the information out of the query. I know it has something to do with Tuples, but Tuples are very confusing to me, even after various tutorials.

Thanks again,
-RCM

Share this post


Link to post

Dude, if i were you, i would go to irc.openprojects.net and ask in #python.

And tuples are just lists that you can't modify :P

Share this post


Link to post

I dont have much experience with python, mysql etc. but if you need any help explaining object orientation etc I may be able to help. I think this is probably the wrong place to ask, though.

Share this post


Link to post

Heh that reminds me of something. A couple of days back, I were at a store and a guy walked up to me, pointed at the DVD section and asked me what that 'DVD' thing was. I told him that it was like CD's but for movies. He asked me what a CD is. Heh.


Only in sweden!

Share this post


Link to post
Guest
This topic is now closed to further replies.
×