Sign in to follow this  
Followers 0
torels

Sqlite question

6 posts in this topic

hi there

I have a question...

how do I get the content of a single column in sqlite ?

thanks in advance

torels_


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites



hi there

I have a question...

how do I get the content of a single column in sqlite ?

thanks in advance

torels_

Specify the name of the column in the query. For example, to get all columns of all rows, you would query "Select * From TableName". To get just the column PhoneNum you would replace "*" with the column name and query "Select PhoneNum From TableName".

:P


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

Specify the name of the column in the query. For example, to get all columns of all rows, you would query "Select * From TableName". To get just the column PhoneNum you would replace "*" with the column name and query "Select PhoneNum From TableName".

:P

I got it! :P

I wrote this for the moment...

#include <sqlite.au3>
#include <sqlite.dll.au3>
Local $hQuery,$aRow
_SQLite_Startup()
_SQLite_Open(@ScriptDir & "\artists.db")
_SQLite_Exec(-1,"Create table Songs (Title not null, mp3Path not null, LyricPath not null);" & _
                "Insert into Songs values ('abb','C:\Foo.mp3','C:\foo.txt');" & _
                "Insert into Songs values ('slipknot - before I forget','C:\bif.mp3','C:\bif.txt');")
$d = _SQLite_Exec(-1, "Select Songs.Title From Songs;", "_result")
Func _result($aRow)
    For $s In $aRow
        ConsoleWrite($s & @TAB)
    Next
    ConsoleWrite(@LF)
EndFunc
_SQLite_Close()
_SQLite_Shutdown()

It's the beginning of a lyrics/karaoke program XD


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

I got it! :P

I wrote this for the moment...

#include <sqlite.au3>
#include <sqlite.dll.au3>
Local $hQuery,$aRow
_SQLite_Startup()
_SQLite_Open(@ScriptDir & "\artists.db")
_SQLite_Exec(-1,"Create table Songs (Title not null, mp3Path not null, LyricPath not null);" & _
                "Insert into Songs values ('abb','C:\Foo.mp3','C:\foo.txt');" & _
                "Insert into Songs values ('slipknot - before I forget','C:\bif.mp3','C:\bif.txt');")
$d = _SQLite_Exec(-1, "Select Songs.Title From Songs;", "_result")
Func _result($aRow)
    For $s In $aRow
        ConsoleWrite($s & @TAB)
    Next
    ConsoleWrite(@LF)
EndFunc
_SQLite_Close()
_SQLite_Shutdown()

It's the beginning of a lyrics/karaoke program XD

You got it. :P

You don't have to specify the table with "Songs.Title"; that query will work the same as "Select Title From Songs". But it works either way.

:o


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

Ok thanks! :P

:P


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

YES! I Hacked that Idiot of 127.0.0.1 !

Lmao

My friend said he bet he could hack my computer. He asked for my IP and i said its

127.0.0.1


READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

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