You could also try to get some help on #python channel. Folk there are
very friendly and knowledgeable.

On Wed, Jan 20, 2010 at 2:53 PM, geekbuntu <[email protected]> wrote:
> Just did:
> search class with suggested changes:
>
> class search:        #under construction - gets errors - webpy has no
> concession for "LIKE" in query?
>    def GET(self):
>        web.header('Content-Type', 'text/html')
>        i = web.input()
>        db = web.database(host='127.0.0.1', port=3307, dbn='mysql',
> user='gmilby', pw='epheivoa', db='gmilby_geekbuntu')
>        results = db.select('books', where='title LIKE $search', vars=
> {'title': i.search})
>        #results = db.query('books', where="title LIKE $i.search")
>        return render_sub.search(results)
>
> search.html excerpt:
>                        <!-- Search Field -->
>                        <fieldset id="search_wrapper">
>                                <form name="search" action="search">
>                                        <input type="text" value="Search" 
> class="search" name="search" />
>                                        <input type="submit" value="Search" 
> class="hide" />
>                                </form>
>                        </fieldset>
>
> Page crashed: http://www.syrbotwebdesign.com/search?search=red
>
> no readable errors.
>
> Branko - thank you very  much for suggesting something - it's nice to
> get replies to try to fix a problem.
> Thank you very much,
> greg
>
>
>
> On Jan 20, 8:44 am, Branko Vukelic <[email protected]> wrote:
>> On Wed, Jan 20, 2010 at 2:39 PM, geekbuntu <[email protected]> wrote:
>> >        results = db.query('books', where="title LIKE '$i.search'")
>>
>> Have you tried this:
>>
>>     db.select('books', where='title LIKE $search', vars={'search': i.search})
>>
>> ?
>>
>> Best regards,
>>
>> --
>> Branko Vukelić
>>
>> http://foxbunny.tumblr.com/http://www.flickr.com/photos/16889...@n04/http://www.twitter.com/foxbunnyhttp://github.com/foxbunny
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/webpy?hl=en.
>
>
>
>



-- 
Branko Vukelić

http://foxbunny.tumblr.com/
http://www.flickr.com/photos/16889...@n04/
http://www.twitter.com/foxbunny
http://github.com/foxbunny

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to