How to use sqlalchemy to connect to a pymysql database with two tables, extract the data and page it?

these are the data of my two tables:

clipboard.png

flask:

clipboard.png

sqlalchemy:

clipboard.png

:

clipboard.png


suppose models.py you designed it this way:

  sql to sqlalchemy Project  

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2258d-2b613.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2258d-2b613.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?