Here, try this: http://dpaste.com/148487/
On Thu, Jan 21, 2010 at 4:28 PM, geekbuntu <[email protected]> wrote: > latest class paste -- not working: > > http://paste.pocoo.org/show/168016/ > > > > On Jan 20, 9:28 am, Greg Milby <[email protected]> wrote: >> i already changed it - it happens sometimes... get paste happy. >> >> ----------------------- >> Visit My Sites!www.syrbot.com| My Sitewww.attackr.com| Latest Blog Posts >> >> >> >> On Wed, Jan 20, 2010 at 9:26 AM, Branko Vukelic <[email protected]> wrote: >> > Try it on your local machine then. It's faster and safer. And you >> > don't have to reveal your database's password either. (I recommend >> > changing the password you pasted earlier, too.) >> >> > It's also not a bad idea to see if it's your particular setup on your >> > hosting account, or something else. >> >> > On Wed, Jan 20, 2010 at 3:15 PM, Greg Milby <[email protected]> wrote: >> > > Thanks - my hosting is the cheapest package, so i can't restart the >> > servers >> > > after i kill them... i'll try your paste in a bit as soon as the restart >> > > script runs. >> > > Thanks, >> > > greg >> > > class search: #under construction - gets errors - webpy has no >> > > concession for "LIKE" in query? >> > > def POST(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='eputureoa', db='gmilby_geekbuntu') >> > > to try#results = db.select('books', where='title LIKE $search', >> > > vars= {'title': '$i.search'}, _test=True) >> > > #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) >> > > ----------------------- >> > > Visit My Sites! >> > >www.syrbot.com| My Site >> > >www.attackr.com| Latest Blog Posts >> >> > > On Wed, Jan 20, 2010 at 9:05 AM, Branko Vukelic <[email protected]> >> > wrote: >> >> > >> Plase use dpaste.com for code samples. It's hard to read like this. >> >> > >> BTW, is web.config.debug set to True? Please try that. Also, try to do >> > >> it all in console on your test machine: >> >> > >>http://dpaste.com/147910/ >> >> > >> Note that the last argument to select is _test=True, which prints the >> > >> SQL rather than hitting the database. >> >> > >> You can also use a debugger like WinPDB to see what's going on. I >> > >> usually do it when something really complicated is going on (like >> > >> possible trouble on any of the many layers without a concrete error >> > >> message). >> >> > >> 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/... >> >> > >> > -- >> > >> > 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]<webpy%[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]<webpy%[email protected]> >> > . >> > >> For more options, visit this group at >> > >>http://groups.google.com/group/webpy?hl=en. >> >> > > -- >> > > 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]<webpy%[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] <webpy%[email protected]>. >> > For more options, visit this group at >> >http://groups.google.com/group/webpy?hl=en. > > -- > 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.
