Python – how to construct SQL with “AND” and “OR” with LIKE

def run_query_table_multi( search, and_flag=False ): if and_flag is True: combo = ” and ” else: combo = ” or ” try: conn = mariadb.connect( user=self.user, password=self.password, host=self.host, port=self.port, database=self.database ) except mariadb.Error as e: print(f”Error connecting to MariaDB Platform: {e}”, e) sys.exit(1) # Get Cursor cur = conn.cursor() my_sql_qry = “SELECT rec_id, title, http from recipe where” q_bld = “” […]