Jump to content
Sign in to follow this  
fielmann

SQLite: How to select only one field?

Recommended Posts

fielmann

SQLite: How to select only one field?

I could only realize it with: _SQLite_QuerySingleRow :o

#include <SQLite.au3>
#include <SQLite.dll.au3>
Local $aRow
_SQLite_Startup()
_SQLite_Open("..\sqlite\database.db")

$SQL = "select field from table where id=100"

_SQLite_QuerySingleRow(-1,$SQL,$aRow)

MsgBox(0,"SQL-Result:",$aRow[0])

_SQLite_Close()
_SQLite_Shutdown()

Is there a simple way to read out only one field? :)

Edited by fielmann

Share this post


Link to post
Share on other sites
ChrisL
fielmann

Try that

$SQL = "select field from table where id=100 LIMIT 1"

id=100 is already unique! :o

so I get always back one result. :D

Can anybody send me an example how to realize? :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.