Re: [sqlite] sqlite query with c++ variable

2010-07-09 Thread Eric Smith
smengl90 wrote:

> Hi, I want to compose a query that will use a c++ variable. For example I
> have:
> 
> int i= 5;
> char * query = "SELECT * from userInfo WHERE count<'i'".
> 
> The syntax does not work. How do I do that?

I think your primary problem is lack of experience in C++.  I 
strongly recommend that you read up on the language itself before
attempting to write SQLite applications.

Are you required to use C++?  You may find it (much, much) easier to 
use Tcl at first.

If I may ask: are you a student, or doing this for fun in your spare 
time, or is this a part of your job?

Eric

--
Eric A. Smith

Windows is *NOT* a virus - viruses are small and efficient.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite query with c++ variable

2010-07-09 Thread Sam Carleton
On Fri, Jul 9, 2010 at 2:48 PM, smengl90
 wrote:
>
> Hi, I want to compose a query that will use a c++ variable. For example I
> have:
>
> int i= 5;
> char * query = "SELECT * from userInfo WHERE count<'i'".
>
> The syntax does not work. How do I do that?

smengl90,

You are asking a question that would be answered in an decent tutorial
on C/C++ programming.  Based on your earlier questions about how to
compile/link C/C++ code and now this question, I have to say:

You might get a lot farther, a lot faster, if you step back from
sqlite for a little bit and dig into basic C/C++ programming.

Sam
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite query with c++ variable

2010-07-09 Thread smengl90

Hi, I want to compose a query that will use a c++ variable. For example I
have:

int i= 5;
char * query = "SELECT * from userInfo WHERE count<'i'".

The syntax does not work. How do I do that?

Thanks 
-- 
View this message in context: 
http://old.nabble.com/sqlite-query-with-c%2B%2B-variable-tp29121237p29121237.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite query with c

2010-07-09 Thread smengl90


-- 
View this message in context: 
http://old.nabble.com/sqlite-query-with-c-tp29120975p29120975.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users