[Zope] In desparate need of some help

Curtis Maloney curtis@cardgate.net
Wed, 17 Jan 2001 10:50:12 +1100


On Wednesday 17 January 2001 10:40, alankirk wrote:

> >   Hi there, i am new to zope and i'm in need of some help. I'm using zope
> as part of my final year project for university. I am using zope with a
> database i've constructed using MySQL. I've been having trouble sending
> queries to MySQL for data from the tables in the DB, instead of the
> required data i get an error message window appear and my python server
> crashes(which is running on my machine, by the way i'm using version 2.2.2
> of zope on windows ME). Somethimes the error message is blank, other times
> it's PYTHON15.DLL or MYSQL.DLL when it crashes.

Hmm... not sure about this.  All I can suggest is you check to see if MySQL 
or Python have issues with WindowsME...  (wow, people actually run that ??:)

> Also when i submit a query
> to add data to a table zope returns what appears to be a error message in
> my browser, which the zope control panel is using, but the data is still
> added to my DB table. When submitting a query to extract data, if my python
> server doesn't crash, zope returns the following: Error, MySQL.error: have
> an error in your SQL syntax near ' '', '', '', 2000 )' at line 3

My first recommendation would be to grab yourself a good book on SQL.  
O'Reilly & Assoc "MySQL & mSQL" is a good reference in your case.  The 
problem with  your select statement is it is incorrect.  It should be in the 
form:

SELECT <field list> FROM <table>
WHERE <field><comparison><value>
[AND|OR] <field><comparison><value>
...

so, in your particular case, I would guess:

SELECT * FROM songdetails
WHERE fifthFieldName = 2000

> ---------------------------------------------------------------------------
>----- SQL used:
>
> SELECT * FROM songdetails
> WHERE(
>      '',
>      '',
>      '',
>      '',
>      2000
>      )
>
> I'd be most grateful if you could provide some answers to any of these
> probelms as soon as you can. Even if you don't know if you could point me
> in the direction of someone who does.
>
> Cheers
>
> Alan

Have a better one,
	Curtis Maloney