Skip to content

Instantly share code, notes, and snippets.

@bmoore
Created March 28, 2014 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmoore/9842963 to your computer and use it in GitHub Desktop.
Save bmoore/9842963 to your computer and use it in GitHub Desktop.
def get_cruise_type_ticket_type_price_id_by_cruise_type_id_and_ticket_type_id(cruise_type_id, ticket_type_id):
with session_scope() as session:
result = session.execute('''
SELECT id
FROM cruise_type_ticket_type
WHERE cruise_type_id = :cruise_type_id
AND ticket_type_id = :ticket_type_id
''', {
'cruise_type_id': cruise_type_id,
'ticket_type_id': ticket_type_id
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment