Re: problems with mysql db

2009-06-30 Thread Gabriel Genellina
En Tue, 30 Jun 2009 03:33:52 -0300, Dennis Lee Bieber escribió: On Mon, 29 Jun 2009 11:59:59 -0300, "Gabriel Genellina" declaimed the following in gmane.comp.python.general: The fact that it's the same character used for formatting strings with the % operator is an unfortunate coincidenc

Re: problems with mysql db

2009-06-29 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > The fact that it's the same character used for formatting strings with the > % operator is an unfortunate coincidence (or a very bad choice, I don't > know). That's not the problem. The problem is that MySQLdb IS indeed using Python format substitution to

Re: problems with mysql db

2009-06-29 Thread Scott David Daniels
golu wrote: here i have posted my code...plz tell why am i getting the error "int argument required" on the hash marked line(see below) although i am giving an int value ... url_count += 1 curse.execute("INSERT INTO URL_TABLE VALUES(%d,%s)", (url_count,file_path)

Re: problems with mysql db

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 10:32:40 -0300, Petr Messner escribió: use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood

Re: problems with mysql db

2009-06-29 Thread Petr Messner
Hi, use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood it, sorry for my English :-) You can also check MySQLdb modu

problems with mysql db

2009-06-29 Thread golu
here i have posted my code...plz tell why am i getting the error "int argument required" on the hash marked line(see below) although i am giving an int value #the code import os import string import MySQLdb import stopcheck conn = MySQLdb.connect(host='localhost',user='root',db='urdb') def file_ex