1

It says unable to find myName when I just added the myName in the table:

col.put(["myName", False, 1, blob])
mlist = col.get("myName")
query=col.query("select * where name = 'myName'")
rs = query.fetch(update)
while rs.has_next():
data = rs.next()
data[2] = data[2] + 1
rs.update(data)

1 Answers1

0

The code you´re running is creating a collection with one column called "myName" of type blob.

Then you´re running a select statement against that new collection. But there is an error in the statement. The query is looking for a column called "name" having the value "myName" in it. You should have a query like this: select * where myName = 'the text you´re looking for'

Also, I am not entirely sure the blob datatype is a good choice., I would have selected datatype "string" for laboratory exercises instead.