Re: MySQL Problem

2010-09-03 Thread Ian
On 03/09/2010 14:29, Victor Subervi wrote: This is an addendum to my last post. Please observe the following: mysql> select * from spreadsheets where Temp=1; +-++---+-++--+ | ID | Client | Multi | Item| Markup | Temp | +-+

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
On Fri, Sep 3, 2010 at 9:25 AM, Richard Arts wrote: > These are also mere suggestions. > > The statements you use in your print statement and the one you use to > feed the cursor differ slightly. The latter is missing quotes around > your search criterium. > > Isn't it possible to fetch results r

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
This is an addendum to my last post. Please observe the following: mysql> select * from spreadsheets where Temp=1; +-++---+-++--+ | ID | Client | Multi | Item| Markup | Temp | +-++---+-++--

Re: MySQL Problem

2010-09-03 Thread Richard Arts
These are also mere suggestions. The statements you use in your print statement and the one you use to feed the cursor differ slightly. The latter is missing quotes around your search criterium. Isn't it possible to fetch results row by row and see if the missing row is in the set? That way you c

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
On Thu, Sep 2, 2010 at 3:02 PM, Ian wrote: > On 02/09/2010 19:34, Victor Subervi wrote: > >> for some reason running the command through python *omits* this one data!! >> The only difference is that a flag in spreadsheets (Temp) is set to 1. Why >> on earth doesn't it work in python?? >> > Some

Re: MySQL Problem

2010-09-02 Thread Ian
On 02/09/2010 19:34, Victor Subervi wrote: for some reason running the command through python *omits* this one data!! The only difference is that a flag in spreadsheets (Temp) is set to 1. Why on earth doesn't it work in python?? Some ideas to follow up. (These are only guesses). 1) One of t

Re: MySQL problem

2005-03-18 Thread Kent Johnson
wes weston wrote: Dennis Lee Bieber wrote: Try neither, the recommended method is to let the execute() do the formatting... That way /it/ can apply the needed quoting of arguments based upon the type of the data. cursor.execute("insert into produkt1 (MyNumber) values (%d)", (MyValue)) Dennis,

Re: MySQL problem

2005-03-18 Thread wes weston
Dennis Lee Bieber wrote: On Thu, 17 Mar 2005 16:45:57 GMT, wes weston <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: str = "INSERT INTO produkt1 (MyNumber) VALUES(%d)" % (MyNumber) cursor.execute(str) Think you meant "MyValue" for the second item... However... Try nei

Re: MySQL problem

2005-03-17 Thread wes weston
Lad wrote: I have the following program( only insert a record) import MySQLdb conn = MySQLdb.connect (host = "localhost",user = "", passwd = "",db="dilynamobily") cursor = conn.cursor () cursor.execute("""CREATE TABLE produkt1 ( id int(10) unsigned NOT NULL auto_increment, MyNu