[SOLVED] runPrepQuery returns no rows

Hello,
I have the following in a function definition.

sql = 'SELECT column1, column2, column3 FROM table1 WHERE column4 = ?'
args = [column4_value]
tbl = system.db.runPrepQuery(sql, args, db)
return tbl

If my value column4_value exists then this code returns column1, column2, column3 as a dataset with 1 row. However, if column4_value doesn’t exist what is returned from this definition? Is it a dataset with no rows? Can I still call tbl[0][0] if there are no rows? How can I check if runPrepQuery is returning nothing?

Just tried it in scripting console. You get <PyDataset rows:0 cols:3>

You can see if there is data in tbl using .getRowCount.

sql = 'SELECT column1, column2, column3 FROM table1 WHERE column4 = ?'
args = [column4_value]
tbl = system.db.runPrepQuery(sql, args, db)
if tbl.getRowCount() > 0:
    #Yeah data
    #Do something with it
return tbl

Thank you!