Lasso Soft Inc. > Home

LassoTalk


options
From: To: Select a List: Reset
From:Rick Dwyer
Date:Wed, February 22 2012 @17:07 PM

Hello all.

I return results from a SQL statement through lasso via the following:

SELECT cartypes.cartypes_name, car.name FROM car LEFT JOIN cartypes ON
car.cartypes_id=cartypes.id where cartypes.brand_id="ford";

It output the results:


sedan tempo
sedan escort
sedan LTD
sedan mustang
convertible mustang
pickup f-150
pickup f-250
pickup f-350


I need to have the result dynamically build an HTML table with each
column being headed by the cartypes_name field returned and each car
name under it like this:


sedan convertible pickup
-----------------------------------------------
tempo mustang f-150
escort f-250
LTD f-350
mustang

So if the query were to find more cartypes, more columns would be
constructed dynamically.

Any info is appreciated as I'm sure I'm missing something obvious.

--Rick

#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>

Constructing tables from output

Hello all. I return results from a SQL statement through lasso via the following: SELECT cartypes.cartypes_name, car.name FROM car LEFT JOIN cartypes ON car.cartypes_id=cartypes.id where cart...
by Rick Dwyer on 2012-02-22 17:07:11

Re: Constructing tables from output

Yes, you should look at to doing an SQL pivot. here is an excellent link http://www.artfulsoftware.com/infotree/queries.php Look for pivot tables. It should give you what you need to construc...
by deco rior on 2012-02-22 15:12:55

Re: Constructing tables from output

Doesn't Knop do something like this automatically? On 2012-02-22, at 5:07 PM, Rick Dwyer wrote: > I need to have the result dynamically build an HTML table with each column being headed by the c...
by Jonathan Guthrie on 2012-02-22 17:56:27

Re: Constructing tables from output

kNope. Not automatically. The difficulty of doing this with Knop or a plain old Lasso inline is the same. Here is an example of how to manipulate news articles under a given year, with uniq...
by Steve Piercy - Web Site Builder on 2012-02-22 15:14:47

Re: Constructing tables from output

Not pivot table output. 2012/2/22 Jonathan Guthrie <Jono@lassosoft.com>: > Doesn't Knop do something like this automatically? > > On 2012-02-22, at 5:07 PM, Rick Dwyer wrote: > >> I need to ha...
by Johan Solve on 2012-02-23 00:31:06

Re: Constructing tables from output

Must have been a tag I saw on tagswap? On 2012-02-22, at 6:14 PM, Steve Piercy - Web Site Builder wrote: > kNope. Not automatically. Jono ---------------------------- Jonathan Guthrie j...
by Jonathan Guthrie on 2012-02-22 18:56:08

Re: Constructing tables from output

Not because you don't want it or the example? On Feb 22, 2012, at 4:31 PM, Johan Solve wrote: > Not pivot table output. > > 2012/2/22 Jonathan Guthrie <Jono@lassosoft.com>: >> Doesn't Kno...
by deco rior on 2012-02-22 17:04:01

Re: Constructing tables from output

This is kinda of a classic rows to columns view? On Feb 22, 2012, at 4:31 PM, Johan Solve wrote: > Not pivot table output. > > 2012/2/22 Jonathan Guthrie <Jono@lassosoft.com>: >> Doesn't Kn...
by deco rior on 2012-02-22 18:30:56

To find out more about this list or how to subscribe - choose the 'i' next to the list name on the right, or click here for more information about LassoTalk

LassoSoft Inc. > Home