Skip to content

Instantly share code, notes, and snippets.

@bmoore
Created March 28, 2014 21:04
Show Gist options
  • 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