im not using web2py to do the second select statement the one "FROM
[master].[dbo].[User]"

just the:
if db(db.User.Email == s).select():
     print "success"

i connected to my db and want to select the table user and the column
email


On Nov 13, 1:05 pm, mdipierro <[email protected]> wrote:
> There is no webpy API to generate
>
> "FROM [master].[dbo].[User]"
>
> only
>
> "FROM [User]"
>
> On Nov 13, 12:45 pm, Crim <[email protected]> wrote:
>
>
>
>
>
>
>
> > what cant i use? the web2py statement?
>
> > On Nov 13, 12:26 pm, mdipierro <[email protected]> wrote:
>
> > > You cannot this in web2py. perhaps you can create a database view.
>
> > > On Nov 13, 12:11 pm, Crim <[email protected]> wrote:
>
> > > > alright so i got a connection between my MSSql server any web2py. that
> > > > has been all sorted out but now im having issues with how to select a
> > > > tuple from web2py
>
> > > > in web2py i have this code:
>
> > > > if db(db.User.Email == s).select():
> > > >      print "success"
>
> > > > which should check if the users email is in the db
>
> > > > but when i write a select statement for my server its like so:
>
> > > > SELECT TOP 1000 [Email]
> > > >       ,[Name]
> > > >       ,[PIN]
> > > >       ,[Phone]
> > > >       ,[Address]
> > > >       ,[Mileage]
> > > >       ,[MealPref]
> > > >   FROM [master].[dbo].[User]
>
> > > > notice the dbo? do i have to include this in my select .. (have tried
> > > > and it still gives errors)
>
> > > > the error snapshot:
> > > > <type 'exceptions.KeyError'>('user')
>
> > > > thanks,
> > > > Crim

Reply via email to