--> -->
 
 
ProgrammingError
Python 3.6.9: /usr/bin/python3
Sun Aug 14 06:03:37 2022

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /home/cryan/public_html/generalblog.py in <module>()
     41 
     42 myCountConnection = mysql.connector.connect( host=hostname, user=username, passwd=password, db=database )
=>   43 totalrowcount = doCount( myCountConnection )
     44 myCountConnection.close()
     45 
totalrowcount undefined, doCount = <function doCount>, myCountConnection = <mysql.connector.connection_cext.CMySQLConnection object>
 /home/cryan/public_html/generalblog.py in doCount(conn=<mysql.connector.connection_cext.CMySQLConnection object>)
     34 def doCount( conn ) :
     35         cur = conn.cursor()
=>   36         cur.execute( "select count(*) from blogcategory where blogcategory = " + blogcat + "  order by postdate" )
     37         records = cur.fetchall()
     38         for row in records:
cur = <mysql.connector.cursor_cext.CMySQLCursor object>, cur.execute = <bound method CMySQLCursor.execute of <mysql.connector.cursor_cext.CMySQLCursor object>>, global blogcat = ''
 /home/cryan/.local/lib/python3.6/site-packages/mysql/connector/cursor_cext.py in execute(self=<mysql.connector.cursor_cext.CMySQLCursor object>, operation='select count(*) from blogcategory where blogcategory = order by postdate', params=(), multi=False)
    269             result = self._cnx.cmd_query(stmt, raw=self._raw,
    270                                          buffered=self._buffered,
=>  271                                          raw_as_string=self._raw_as_string)
    272         except MySQLInterfaceError as exc:
    273             raise errors.get_mysql_exception(msg=exc.msg, errno=exc.errno,
raw_as_string undefined, self = <mysql.connector.cursor_cext.CMySQLCursor object>, self._raw_as_string = False
 /home/cryan/.local/lib/python3.6/site-packages/mysql/connector/connection_cext.py in cmd_query(self=<mysql.connector.connection_cext.CMySQLConnection object>, query=b'select count(*) from blogcategory where blogcategory = order by postdate', raw=False, buffered=False, raw_as_string=False)
    517         except MySQLInterfaceError as exc:
    518             raise errors.get_mysql_exception(exc.errno, msg=exc.msg,
=>  519                                              sqlstate=exc.sqlstate)
    520         except AttributeError:
    521             if self._unix_socket:
sqlstate undefined, exc undefined

ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by postdate' at line 1
      args = (1064, "1064 (42000): You have an error in your SQL synt... syntax to use near 'order by postdate' at line 1", '42000')
      errno = 1064
      msg = "You have an error in your SQL syntax; check the ... syntax to use near 'order by postdate' at line 1"
      sqlstate = '42000'
      with_traceback = <built-in method with_traceback of ProgrammingError object>