On Dec 27 2007, 5:25 pm, Ian Clark <[EMAIL PROTECTED]> wrote:
> On 2007-12-27, SMALLp <[EMAIL PROTECTED]> wrote:
>
> > connectionString = {"host":"localhost", "user":"root",
> > "passwd":"pofuck", "db":"fileshare"}
> > dataTable = "files"
> > conn = mysql.connect(host=connectionString["host"],
> >
On 2007-12-27, SMALLp <[EMAIL PROTECTED]> wrote:
> connectionString = {"host":"localhost", "user":"root",
> "passwd":"pofuck", "db":"fileshare"}
> dataTable = "files"
> conn = mysql.connect(host=connectionString["host"],
> user=connectionString["user"], passwd=connectionString["passwd"],
> db=conn
On Dec 28, 7:03 am, SMALLp <[EMAIL PROTECTED]> wrote:
> Hy! I nave another problem I can't solve!
>
>
> import MySQLdb as mysql
>
> connectionString = {"host":"localhost", "user":"root",
> "passwd":"pofuck", "db":"fileshare"}
> dataTable = "files"
> conn = mysql.connect(host=connectionStri
Rob Williscroft wrote:
> SMALLp wrote in news:[EMAIL PROTECTED] in comp.lang.python:
>
>> Hy! I nave another problem I can't solve!
>>
>>
>> import MySQLdb as mysql
>
>> cursor = conn.cursor()
>> sql = "SELECT COUNT(*) FROM " + dataTable
>> res = cursor.execute(sql)
>
> I think you need to
SMALLp wrote in news:[EMAIL PROTECTED] in comp.lang.python:
> Hy! I nave another problem I can't solve!
>
>
> import MySQLdb as mysql
> cursor = conn.cursor()
> sql = "SELECT COUNT(*) FROM " + dataTable
> res = cursor.execute(sql)
I think you need to do:
res = cursor.fetchone()[0]
> pri
Hy! I nave another problem I can't solve!
import MySQLdb as mysql
connectionString = {"host":"localhost", "user":"root",
"passwd":"pofuck", "db":"fileshare"}
dataTable = "files"
conn = mysql.connect(host=connectionString["host"],
user=connectionString["user"], passwd=connectionString["p