Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if query empty print python

# cursor.rowcount will usually be set to 0.

if cursor.rowcount == 0:
  print("No results")
  elif cursor.rowcount > 0:
    for results in result_from_query:
      print(results)
 
PREVIOUS NEXT
Tagged: #query #empty #print #python
ADD COMMENT
Topic
Name
1+7 =