db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name) The above returns a Rows object. When you do {{=rows_object}} in a view, it gets serialzied into HTML via SQLTABLE. If you want to extract the first and last names from just a single row, then you'll have to do so explicitly.
Anthony On Tuesday, May 7, 2013 1:11:32 PM UTC-4, Doug Girard wrote: > > Below is a snippet of my code, where I am using FullCalendar. This code is > working, giving me a 'tooltip' when hovering over an event, but my tip: > * > =db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name)* > > Returns a full table like: > > <table><thread><td><th>tech.first_name</th><th>tech.last_name</th>.... on > and on with the names it returns... > > Is there a different way to do my query or tell web2py not to make it into > a table? I just want the data from the 2 columns. > > > Thanks!! > > > $('#calendar').fullCalendar({ > editable: true, > > events: [ > {{for i,row in enumerate(rows):}}{{if i!=0:}},{{pass}} > { > * tip: '{{=db(db.tech.id==row.tech).select(db.tech.first_name, > db.tech.last_name)}}',* > title: '{{=row.name}}', > allDay: false, > start: new Date('{{=row.work_date. > strftime('%B %d, %Y %H:%M:%S')}}'), > end: new Date('{{=row.work_date.strftime('%B %d, %Y > %H:%M:%S')}}'), > url: '{{=URL('sites',args=row.id)}}' > } > {{pass}} > ], > eventRender: function(event, element) { > element.attr('title', event.tip); > } > }); > > > This code above is working for me but my tip: > > =db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name) > > Returns a full table like: > > <table><thread><td><th>tech.first_name</th><th>tech.last_name</th>.... on > and on with the names it returns... > > is there a different way to do my query or tell web2py not to make it into > a table? > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.