SQL update trouble

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Question  SQL update trouble Post: #1
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 ;)
find quote