SQL update trouble
#1
Question 
I have trouble using wildcards with the executehttpapi function.

I have this
Code:
UPDATE files SET playCount = 1 WHERE strFilename LIKE "%%s04e03 EPT 4 - Barcelona Final Table.avi"
in query and send it to
Code:
xbmc.executehttpapi( "ExecVideoDatabase(%s)" % urllib.quote_plus(query.encode( "utf-8", "ignore" )), )
the quote_plus makes it look like this
Code:
UPDATE+files+SET+playCount+%3D+1+WHERE+strFilename+LIKE+%22%25%25s04e03+EPT+4+-+Barcelona+Final+Table.avi%22
But get no match even though the file is in the db.

This is just my guess... somewhere after that the double % get handle as %s (due to the filename starting with s) and that wont return a match.
If I remove the %% it works, but I need em in some cases.
If I change the first s to upper case it works, but not really a fix.

What am I doing wrong Huh
If you find any spelling mistakes you can keep them ;)
Reply

Logout Mark Read Team Forum Stats Members Help
SQL update trouble 0