04-02-2017, 01:55 PM
Somehow I am doing something wrong in this seemingly simple question.
How do I output rows likle this
c0, c1, c2,...
c0, c1, c2,...
c0, c1, c2,...
c0 = contents colum 0, etc...
I use the QM sqlite functionality and I just want to simply output each row as shown above.
Macro Macro6
To be clear: it's just simple row output I want, each row outputs each column.
The above code outputs the contents but not correctly row-wise.
How do I output rows likle this
c0, c1, c2,...
c0, c1, c2,...
c0, c1, c2,...
c0 = contents colum 0, etc...
I use the QM sqlite functionality and I just want to simply output each row as shown above.
Macro Macro6
str dbfile="F:\portableapps\chrome\Data\profile\Default\Cookies" ;; File has NO extension.
str table="cookies" ;; table is also called 'cookies' !
str s
Sqlite db3.Open(dbfile)
ARRAY(str) ar; int r c
db3.Exec(F"SELECT * FROM {table}" ar)
for r 0 ar.len(1) ;;for each row
,for c 0 ar.len(2) ;;for each column?
,,s.from(s ar[r c] ",")
,s.rtrim(",")
,out s
,;Output each row:
,;[c0] , [c1] , ...etc
,;[c0] , [c1] , ...etc
,;[c0] , [c1] , ...etc
,s="" ;; empty 's' for next row...
To be clear: it's just simple row output I want, each row outputs each column.
The above code outputs the contents but not correctly row-wise.