Updating a filename's counter value failed each time
Alister
alister.ware at ntlworld.com
Mon Jun 17 16:49:56 EDT 2013
On Mon, 17 Jun 2013 20:44:03 +0000, John Gordon wrote:
> In <MtKvt.47400$ja6.35986 at fx18.am4> Alister <alister.ware at ntlworld.com>
> writes:
>
>> > #update file's counter if cookie does not exist cur.execute('''UPDATE
>> > files SET hits = hits + 1, host = %s, lastvisit =
>> > %s WHERE url = %s''', (host, lastvisit, filename) )
>> >
>> > if cur.rowcount:
>> > print( " database has been affected" )
>> >
>> > indeed every time i select afilename the message gets printed bu then
>> > again noticing the database via phpmyadmin the filename counter is
>> > always remaining 0, and not added by +1
>
>> replase
>> if cur.rowcount:
>> print( " database has been affected" )
>
>> with print cur.rowcount()
>
> rowcount isn't a method call; it's just an attribute. You don't need
> the parentheses.
My bad, Sorry if I confused Nicos further .
--
It's better to be wanted for murder that not to be wanted at all.
-- Marty Winch
More information about the Python-list
mailing list