On 1/16/18, Enrique Mesa <[email protected]> wrote:
> I am writing this message because i need a bit of help performing this kind
> of query in sqlite engine. My wish to run the following SQL statement:
> "SELECT * FROM users WHERE username = ? ;";
Suggestion you number your parameters for clarity:
"SELECT * FROM users WHERE username = ?1;"
Also, suggestion you spell out the columns you are requesting, rather than
using the "*".
"SELECT id, user_hash, user_salt FROM users WHERE username = ?1;"
Generate the prepared statement using sqlite3_parepare_v2(). Then
bind the value to ?1 using sqlite3_bind_text(pStmt, 1, zUserName, -1,
SQLITE_TRANSIENT);
>
> I am not using wrappers. I am using just plain SQLite C Library from my
> program wirtten in C++. I don't know how to face this.
>
> It is expected to get back just one record, because it is a uses login
> system. It must return the userhash, and user salt.
>
> CREATE TABLE users(
> id INTEGER PRIMARY KEY,
> username TEXT,
> user_hash INTEGER,
> user_salt TEXT);
>
> Please help me. I am looking also for developers whom want to test my
> software. Test means clients whom want to use it.
>
> I am a newbie on the programming world.
>
> Thanks
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users