Hello !
perhaps this might be a n00b markaby question but...we are finding some
issues to display records with a simple space inside a view (both with
sqlite, mysql or kirbybase so it is not db related).
E.g. to have a formatted (with a simple space between the records so
nothing fancy like Stock Name Apple Ticker AAPL number of
stocks 10 bought at 580.13$ on 2012-04-17 Total position 5801.3)
list I have to do something like this
def index
kirby = KirbyBase.new
stocks_tbl = kirby.get_table(:stocks)
results =
stocks_tbl.select(:name,:ticker,:tradeprice,:tradedate,:quantity,:totalposition,:recno).sort(+:totalposition)
for result in results
text 'Stock Name  '
text result.name
text ' '
text 'Ticker  '
text result.ticker
text ' '
text 'number of stocks'
text ' '
text result.quantity
text ' '
text 'bought at  '
text result.tradeprice
text '$  '
text 'on  '
text result.tradedate
text ' '
text 'Total position'
text ' '
text result.totalposition
br
Now I am sure that there is perhaps a better way to do it ? :)
Thanks in advance
David
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list