Warning: pg_escape_string() expects parameter 1 to be resource, null given in /opt/lampp/htdocs/gntsolution_2023/Gnt_main_bak/include/php/visit_count.php on line 13

Warning: pg_escape_string() expects parameter 1 to be resource, null given in /opt/lampp/htdocs/gntsolution_2023/Gnt_main_bak/include/php/visit_count.php on line 14

Warning: pg_query() expects parameter 1 to be resource, null given in /opt/lampp/htdocs/gntsolution_2023/Gnt_main_bak/include/php/visit_count.php on line 21
Error with the query