text("select * from usersearches where searchschedule=:dayno", engine=myengine).execute(dayno=5) ?
that would be here: http://www.sqlalchemy.org/docs/ sqlconstruction.myt#sql_textual_textual_binds On Mar 1, 2007, at 10:20 AM, metaperl wrote: > > This would seem to be an easy obvious task, but searching both this > newsgroup and the SQLAlchemy.org website do not turn up any docs on > the process. > > I want to get a result proxy for executing this SQL, in the processing > binding the variable dayno to searchSchedule: > > def load(sa, dayno): > """take SQLALCHEMY_OBJECT and a day_number and return > a RESULT_PROXY consisting of all records satisfying query""" > > sql = """ > SELECT > * > FROM > UserSearches > WHERE > searchSchedule = ? > """ > > > > === call to create my SA object === > > from sqlalchemy import * > > class sa(object): > > def __init__(self, ip="4.12.18.4", db="DATA", engine_echo=True): > > url = 'mssql://perl2:[EMAIL PROTECTED]:1433/%s' % (ip, db) > print "Connection url", url > self.engine = create_engine(url) > self.engine.echo=engine_echo > self.metadata = BoundMetaData(self.engine) > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---