Sign in to follow this  
Followers 0
shaqan

[SOLVED]SQLite whole column into array

3 posts in this topic

#1 ·  Posted (edited)

Hello. Is there some way for inserting batch records from SQLite table into AutoIt3 array, instead of looping trough every single record using _SQlite_Fetchdata?

SQLite query would be something like this SELECT DISTINCT IP FROM memtable WHERE VALIDITY = '1' AND CATEGORY = 'Advertising'

looping would work but with hundreds of thousands of records, it would take bunch of time each time.

I was trying to combine SQLite table, _SQLite_FetchData and _FileWriteFromArray but got stuck at that point, not finding reasonably fast way for exctraction of data.

Edited by shaqan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

shaqan,

If all you want is one column then try _SQLite_GetTable.  For 2 or more columns use _SQLite_GetTable2d.  Your SQL stmt looks good.

See the Help file for syntax.

kylomas

edit: The two functions I mentioned use _SQLite_FetchData and build an array for you.  You could do the same by using your SQL stmt with fetchdata and doing whatever you want with the row.  Way easier to use the GetTable wrapper.

Edited by kylomas
additional data
1 person likes this

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Man, you are saviour! :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0