SMALLp wrote in news:[EMAIL PROTECTED] in comp.lang.python:

> Hy! I nave another problem I can't solve!
> <code>
> 
>      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]


> print res
> 
> <code>
> It prints 1, and there are 88 rows in table. SELECT works fine, but 
> SELECT COUNT(*) makes problems.
 
Rob.
-- 
http://www.victim-prime.dsl.pipex.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to