--> -->
 
 
ProgrammingError
Python 3.6.9: /usr/bin/python3
Fri Dec 2 14:34:12 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/secure_html/daily/index.py in <module>()
     88 
     89 myConnection = mysql.connector.connect( host=hostname, user=username, passwd=password, db=database )
=>   90 content,promo,maincategory,headerimage = doQuery( myConnection )
     91 myConnection.close()
     92 
content undefined, promo undefined, maincategory undefined, headerimage undefined, doQuery = <function doQuery>, myConnection = <mysql.connector.connection_cext.CMySQLConnection object>
 /home/cryan/secure_html/daily/index.py in doQuery(conn=<mysql.connector.connection_cext.CMySQLConnection object>)
     69 #       print(query)
     70         
=>   71         cur.execute( query )
     72         records = cur.fetchall()
     73         for row in records:
cur = <mysql.connector.cursor_cext.CMySQLCursor object>, cur.execute = <bound method CMySQLCursor.execute of <mysql.connector.cursor_cext.CMySQLCursor object>>, query = 'select blogcategory.date, blogcategory.title, co... = 9 and YEAR(postdate) = order by postdate DESC'
 /home/cryan/.local/lib/python3.6/site-packages/mysql/connector/cursor_cext.py in execute(self=<mysql.connector.cursor_cext.CMySQLCursor object>, operation='select blogcategory.date, blogcategory.title, co... = 9 and YEAR(postdate) = order by postdate DESC', 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 blogcategory.date, blogcategory.title, ...= 9 and YEAR(postdate) = order by postdate DESC', 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 DESC' at line 1
      args = (1064, "1064 (42000): You have an error in your SQL synt...ax to use near 'order by postdate DESC' at line 1", '42000')
      errno = 1064
      msg = "You have an error in your SQL syntax; check the ...ax to use near 'order by postdate DESC' at line 1"
      sqlstate = '42000'
      with_traceback = <built-in method with_traceback of ProgrammingError object>