Andy Dustman

Show:

What's happening?

  • Followup: RE: queries intermittently returns empty result

    It's a standard API for database modules. db.query(), db.store_result(), etc. are all low-level implementation details that are specific to MySQL. Handling result sets is not trivial; they have to be freed up before additional queries can be executed. MySQLdb does this for you (including proper encoding of parameters and decoding of results) *if* you use the DB-API.

    2010-01-06 19:02:58 UTC in MySQL for Python

  • Followup: RE: queries intermittently returns empty result

    A rough attempt to correct your original code (doesn't try to return data as dictionaries, left as an exercise for the reader): [code] def get_node_tx_table(self,serial): date_and_time = datetime.now() date_last_disconnected = date_and_time.date() time_last_disconnected = date_and_time.time() query1 = "SELECT %%s, %%s, %%s, %%s, %%s FROM %s WHERE %s = %%s".

    2010-01-06 17:12:37 UTC in MySQL for Python

  • Followup: RE: queries intermittently returns empty result

    Yes, that's what I meant. [url=http://www.python.org/dev/peps/pep-0249/]PEP-249[/url] describes the standard Python DB-API. MySQLdb uses %s as the parameter placeholder. Don't use string interpolation (i.e. the % operator) to insert query parameters; with execute(), the parameters are passed separately, i.e. c.execute(query, args). If you must insert table or column names into your query, then...

    2010-01-06 17:01:06 UTC in MySQL for Python

  • Followup: RE: queries intermittently returns empty result

    You shouldn't be using db.query. Use db.execute() instead. Read PEP-249.

    2010-01-06 14:42:13 UTC in MySQL for Python

  • Followup: RE: MySQLdb/Djan problem in conjunction with MAMP

    It seems to be looking for the MySQL libs in /usr/local/mysqli/lib. See what this produces: $ which mysql_config $ mysql_config --libs Is it possible also that you had a version of MySQL installed in /usr/local at one time (or still do)? You might want to put MAMP earlier in your $PATH.

    2009-12-28 04:20:19 UTC in MySQL for Python

  • Followup: RE: Problem in Py2.5

    You installed from a pre-built egg built against MySQL-5.0. Solution: Install from source. Point easy_install to a source tarball. If you have problems, read the README file.

    2009-12-09 15:41:52 UTC in MySQL for Python

  • MySQL for Python

    adustman made 1 file-release changes.

    2009-12-04 15:49:03 UTC in MySQL for Python

  • Followup: RE: MySQL-python-1.2.2.win32-py2.6.exe

    We will probably have an update RC release sometime in the next week; I plan to work on this over the weekend. This will be followed by 1.2.3. After that, we'll work on getting some WIndows builds officially available. Probably these will be Python 2.6 from python.org and MySQL-5.1 from mysql.com, for both 32- and 64-bit platforms. We still haven't figured out exactly how we will get these...

    2009-12-04 15:38:42 UTC in MySQL for Python

  • Comment: Please add option to disable comments on packages/releases

    The first time I learned of the PyPi comments is when the following comment appeared: "The mysqldb download address isn't set properly, outside of that the mysql db wrapper is extremely helpful! (Blehk, 2009-10-22, points)" [http://pypi.python.org/pypi/MySQL-python/1.2.3c1] This is not really a bad comment. It's actually specific to the PyPI link itself, and it was referring to a problem I...

    2009-11-13 12:39:38 UTC in Python Package Index

  • Followup: RE: Cannot find libmysqlclient_r.so.16

    libmysqlclient_r.so is not on your default library load path. You don't say what OS you are using (but obviously something POSIX), so you'll have to do your own research on how to correct this. You can also build MySQLdb with a statically-linked library. The [README][1] describes how to do this. [1]...

    2009-11-05 18:03:11 UTC in MySQL for Python

About Me

  • 2000-09-01 (9 years ago)
  • 71372
  • adustman (My Site)
  • Andy Dustman
  • http://mysql-python.blogspot.com/

  • SQL-based SQL-based C Perl PHP Python HTML/XHTML Security Object Oriented Networking Documentation Documentation
  • sevzn

Send me a message