I don't get it ....
i have a few functions that return rows from sqlite tables. Problem is that some sql querys are working while another not. Function that working perfect :
def selectAll(predstavnik_id):
q = "SELECT * FROM ulaz WHERE predstavnik_id = (?)"
cursor.execute(q, str(predstavnik_id))
rows = cursor.fetchall()
if rows is None:
return None
else:
return rows
And the other one that don't return rows:
def selectStanByUlaz(stan_id):
q = "SELECT * FROM stan WHERE ulaz_id = (?)"
cursor.execute(q, str(stan_id))
rows = cursor.fetchall()
if rows is None:
return None
else:
return rows
There is no any errors, just won't return rows ! I tried in sqlite studio with same query syntax and it's working just fine What could be a problem ?
Thanks in advance