Sign in to follow this  
Followers 0
d0n

SQLite question

6 posts in this topic

Hi, trying to move my ini stuff into SQLite and had a quick question

If i had a database name "Fruits" and it looked like this

Fruit a b c

Apple 17 23 31

Orange 13 43 21

Banana 9 12 32

is it possible to find say, the data from Apple on column b (which would be 23)

I have something like this so far, but it doesn't seem to return the correct one

_SQlite_Query (-1, "SELECT b FROM Fruit ORDER BY Fruit;", $hQuery)
_SQLite_FetchNames ($hQuery, $aNames)
_SQLite_FetchData ($hQuery, $aRow)
ConsoleWrite(@LF&$aRow[0]&@LF)

Also i am not quite sure what Order by really does? if all i want is to find a data in a cell

Share this post


Link to post
Share on other sites



If i had a database name "Fruits" and it looked like this

Fruit a b c

Apple 17 23 31

Orange 13 43 21

Banana 9 12 32

is it possible to find say, the data from Apple on column b (which would be 23)

I have something like this so far, but it doesn't seem to return the correct one

_SQlite_Query (-1, "SELECT b FROM Fruit ORDER BY Fruit;", $hQuery)

...

Also i am not quite sure what Order by really does? if all i want is to find a data in a cell

the query should be:

SELECT b FROM Fruits WHERE Fruit="Apple"

If the result is a single row then the ORDER clause has no meaning

Attention: Fruits is not the database but is the table as a database can have more than a table.

Share this post


Link to post
Share on other sites

ah i see thanks

quick question, is SQLite faster than ini in terms of searching?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

quick question, is SQLite faster than ini in terms of searching?

Do the tests yourself it's easy.

SQL database is perfect for big amount of data where INI files would be bad choice.

Edited by Zedna

Share this post


Link to post
Share on other sites

Do the tests yourself it's easy.

SQL database is perfect for big amount of data where INI files would be bad choice.

How does one write to disk using sqlite - I tried and it did nothing....help!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

How does one write to disk using sqlite - I tried and it did nothing....help!

Specify the file name in _SQLite_Open(). If it doesn't exist, a new DB file will be created.

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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