{"id":4667,"date":"2024-09-04T14:59:07","date_gmt":"2024-09-04T13:59:07","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4667"},"modified":"2024-09-04T14:59:07","modified_gmt":"2024-09-04T13:59:07","slug":"count","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/database\/sqlite\/queries\/select\/count","title":{"rendered":"count()"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Get total number of records<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>    db1cursor.execute(\"\"\"SELECT count(*) FROM tbl_my_table \n                      \"\"\")\n    row = db1cursor.fetchone()\n    if row == None:\n        return(None)\n    \n    total_records = row&#91;0]\n    #print(\"Total captured images: \", total_records)\n    \n    return(total_records)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Get total number of records<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[357],"tags":[],"class_list":["post-4667","post","type-post","status-publish","format-standard","hentry","category-select"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4667"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4667\/revisions"}],"predecessor-version":[{"id":4668,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4667\/revisions\/4668"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}