If you don't mind importing a couple of SQLite functions then you can use sqlite3_get_table. You will then get your results and know the number of rows and columns, which you can put into an array.
;
; ------------------------------------------------------------
;
; PureBasic - Database example ...
Search found 4 matches
- Wed Jun 13, 2012 5:22 pm
- Forum: General Discussion
- Topic: Save DatabaseQuery into Map?
- Replies: 3
- Views: 921
- Wed Nov 02, 2011 5:03 pm
- Forum: Tricks 'n' Tips
- Topic: Max() and Min(), procedure and macro variants.
- Replies: 31
- Views: 11963
Re: Max() and Min(), procedure and macro variants.
I've been using the macros min5 and max5 and just recently found that when they compare equal numbers they add them together.
You can fix this by using <= and >= in the second half of the macros...
Macro Max5(a,b)
(((Not a>b)*b)+((Not a<=b)*a))
EndMacro
Macro Min5(a,b)
(((Not a<b)*b)+((Not a>=b ...
You can fix this by using <= and >= in the second half of the macros...
Macro Max5(a,b)
(((Not a>b)*b)+((Not a<=b)*a))
EndMacro
Macro Min5(a,b)
(((Not a<b)*b)+((Not a>=b ...
- Mon Oct 10, 2011 3:07 pm
- Forum: Coding Questions
- Topic: More than
- Replies: 3
- Views: 1049
Re: More than
Thanks luis.
This seems to fix it...
This seems to fix it...
Code: Select all
a.i = 20
b.i = 30
Debug a - (a > b And 1) ; output is 20
Debug 20 - (20>30 And 1) ; output is 20
- Mon Oct 10, 2011 2:36 pm
- Forum: Coding Questions
- Topic: More than
- Replies: 3
- Views: 1049
More than
Can anybody tell me why the output is different when they look similar...
Code: Select all
a.i = 20
b.i = 30
Debug a - (a > b) ; output is -10
Debug 20 - (20>30) ; output is 20