d0n Posted October 23, 2009 Posted October 23, 2009 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
leos Posted October 23, 2009 Posted October 23, 2009 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.
d0n Posted October 23, 2009 Author Posted October 23, 2009 ah i see thanks quick question, is SQLite faster than ini in terms of searching?
Zedna Posted October 23, 2009 Posted October 23, 2009 (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 October 23, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Joec49 Posted October 27, 2009 Posted October 27, 2009 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!
PsaltyDS Posted October 27, 2009 Posted October 27, 2009 (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 October 27, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now