[mod_python] invalid literal for float

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Wed Oct 22 10:26:53 EST 2003


this reply didn't get forwarded to the list

---------- Forwarded message ----------
Date: Wed, 22 Oct 2003 10:08:40 -0700 (PDT)
From: tpc at csua.berkeley.edu
To: "caffeine at tuxfamily.org" <caffeine at tuxfamily.org>
Subject: Re: [mod_python] invalid literal for float


hi caffeine, I have tested my MySQL statements in PHP and in MySQL
shell with no error.  The MySQL select statement actually comes from a
working PHP script that I rewrote for use with Python.  I executed the
following in the MySQL shell:

CREATE TEMPORARY TABLE URLs_WITH_MATCHES ( url_id INT NOT NULL ) TYPE =
InnoDB;

INSERT INTO URLs_WITH_MATCHES SELECT DISTINCT WORDS_X_URL.url_id FROM
WORDS_X_URL INNER JOIN WORDS ON WORDS_X_URL.word_id = WORDS.id WHERE
WORDS.word = 'anyword'

SELECT URLs.url, URLs.title FROM URLs_WITH_MATCHES, URLs WHERE
URLs_WITH_MATCHES.url_id = URLs.id GROUP BY URLs_WITH_MATCHES.url_id;

drop table URLs_WITH_MATCHES;

with no problem.  Note to those trying this at home, whenever you create a
temporary table and try to SHOW TABLES you can never see the darn thing
(as of MySQL 4.0.14).  But as long as your MySQL shell is alive you can
access a temporary table.

On Wed, 22 Oct 2003, caffeine at tuxfamily.org wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> On Mardi 21 Octobre 2003 19:06, tpc at csua.berkeley.edu wrote:
> > I have attached my code, although I must ask if it was a MySQL error
> > why does my script work fine on the command line and in IDLE ?  Also,
> > the script seems to throw an error during a cursor.execute(sql) of a
> > SELECT statement:
>
> Have you tried your SQL statements on the MySQL command line client ?
> I'd suggest you double-check your tables structure and data, then track
> exactly where is the problem (modpython, python mysql bindings, mysql
> itself...)
>
> Dunno if this is related to your problem, I had once MySQL firing all
> sorts of weird errors. We tracked it down to /var being full, we
> cleaned the partition and everything was back as normal.
>
> my 2 cents,
> sylvain
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE/ll7NK/qAVOpQGPYRAjYPAJ9faZH/I23okt6nhsNjyMFQVuDgQwCeNO12
> E9f0VrPQ5kBZLAJZGXTugQw=
> =/45O
> -----END PGP SIGNATURE-----
>
>




More information about the Mod_python mailing list