tag:blogger.com,1999:blog-1844829803862335252.post7250985118998327889..comments2022-04-01T07:50:59.200-04:00Comments on MySQL-Python: MySQL-python-1.2.3 beta 2 releasedAnonymoushttp://www.blogger.com/profile/13581204403076051529noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-1844829803862335252.post-47683684759427340542010-06-01T13:10:33.979-04:002010-06-01T13:10:33.979-04:00Doug, there is nothing special about JOINs, but if...Doug, there is nothing special about JOINs, but if you are having problems, try posting in the SourceForge forums.Anonymoushttps://www.blogger.com/profile/13581204403076051529noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-26785343237721008332010-06-01T08:22:08.820-04:002010-06-01T08:22:08.820-04:00Andy,
I've just started using MySQLdb and Pyt...Andy,<br /><br />I've just started using MySQLdb and Python and found it really useful. Is it possible to implement the MySQL JOIN command on multiple tables in Python/MySQLdb? I've searched everywhere but most articles demonstrate create table and insert but not JOIN. Any help appreciated<br /><br />yours<br /><br />DougUnknownhttps://www.blogger.com/profile/17604620048663200583noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-18349855930663051132009-11-17T23:43:48.111-05:002009-11-17T23:43:48.111-05:00I'm not sure which versions of MySQL, but at l...I'm not sure which versions of MySQL, but at least some of the 5.0 versions do NOT report the MYSQL_TYPE_SET or MYSQL_TYPE_ENUM resultset column types properly. They are returned as MYSQL_TYPE_STRING with the flags set to either SET_FLAG or ENUM_FLAG. I have fixed your code for my server and wish to share it with the world. Simply add:<br /><br /><b>#define REAL_TYPE(t, f) ((t) != MYSQL_TYPE_STRING ? (t) : ((f) & SET_FLAG ? MYSQL_TYPE_SET : ((f) & ENUM_FLAG ? MYSQL_TYPE_ENUM : (t))))</b><br /><br />Near the top of _mysql.c. Then replace the two instances of <b>fields[i].type</b> with <b>REAL_TYPE(fields[i].type, fields[i].flags)</b>.<br /><br />I hope this helps save someone 10 hours of trying to figure out why Sets are returned as Strings. I would probably suggest this as a pretty safe change to make to the core product. If you want a binary for 1.2.3b2 for windows compiled for Python 2.4, message me. I can probably get other versions compiled for you too if you ask nicely.Litewerkhttps://www.blogger.com/profile/08237892730198381851noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-66801792392106980502009-06-01T07:28:49.440-04:002009-06-01T07:28:49.440-04:00It now fails on OpenSolaris like this:
> easy_i...It now fails on OpenSolaris like this:<br />> easy_install mysql-python<br />Searching for mysql-python<br />Reading http://pypi.python.org/simple/mysql-python/<br />Reading http://sourceforge.net/projects/mysql-python<br />Reading http://sourceforge.net/projects/mysql-python/<br />Best match: MySQL-python 1.2.3c1<br />Downloading http://osdn.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3c1.tar.gz<br />Processing MySQL-python-1.2.3c1.tar.gz<br />Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EdcRxe/MySQL-python-1.2.3c1/egg-dist-tmp-kUQtg9<br />"/opt/csw/include/python2.5/pyport.h", line 761: #error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."<br />cc: acomp failed for _mysql.c<br />error: Setup script exited with error: command 'cc' failed with exit status 2<br /><br />1.2.2 installed on the same system with no problems.Anonymoushttps://www.blogger.com/profile/02481263853203895939noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-74640586749911094492009-05-07T07:24:00.000-04:002009-05-07T07:24:00.000-04:00hi, why don't catch exception after mysql_use_resu...hi, why don't catch exception after mysql_use_result and mysql_store_result?s7v7nislandshttps://www.blogger.com/profile/17536392197280828171noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-79124886054595042872009-04-24T10:15:00.000-04:002009-04-24T10:15:00.000-04:00There will be a binary egg release for Windows for...There will be a binary egg release for Windows for 1.2.3, provided someone makes one for me to distribute, which is likely. I don't make binary releases for pre-releases.Anonymoushttps://www.blogger.com/profile/13581204403076051529noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-4154688384756132662009-04-24T10:09:00.000-04:002009-04-24T10:09:00.000-04:00It is not about requirement - it is about easy_ins...It is not about requirement - it is about easy_install behaviour. I'd expect it to tell what to do next. BTW, I would vote for placing this extension as a module to be downloaded in case of:<br /><br />easy_install mysqlanatoly techtonikhttps://www.blogger.com/profile/07847778636782899903noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-45750638732520088402009-04-23T21:18:00.000-04:002009-04-23T21:18:00.000-04:00You make that sound like a surprise, but the READM...You make that sound like a surprise, but the README makes this quite clear: A C compiler and you need MySQL development headers and libraries installed are prerequisites.Anonymoushttps://www.blogger.com/profile/13581204403076051529noreply@blogger.comtag:blogger.com,1999:blog-1844829803862335252.post-28917688671272431882009-04-23T10:09:00.000-04:002009-04-23T10:09:00.000-04:00It is impossible to install it using easy_install ...It is impossible to install it using easy_install from source without installed MySQL and compiler. The most problematic thing is that there is no descriptive error message from easy_install. The reason for failure is unchecked call to OpenKey() I've left a comment on your SF thread, but I am not sure updates are sent from there if I am not subscribed.anatoly techtonikhttps://www.blogger.com/profile/07847778636782899903noreply@blogger.com