Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Martin Engelschalk
Hi, i think you are asking a C question, and not an sql question. Is your example C code? If this is the case, you should read up on C basics. Feel free to contact me directly (also in German) Martin Am 09.07.2010 21:06, schrieb rollerueckwaerts: > Hello, > I try to get an sql query string from

Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Sam Carleton
I really don't mean to be a jerk, but this does seem to be really off topic for this mailing list. Isn't the concatination of two string a general C/C++ question rather then a sqlite question? Don't you think you might be better off asking this question on a C/C++ mailing list or forum, maybe som

Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Adam DeVita
and don't use strcpy here is why https://buildsecurityin.us-cert.gov/bsi-rules/home/g1/848-BSI.html On Fri, Jul 9, 2010 at 3:06 PM, rollerueckwaerts wrote: > > Hello, > I try to get an sql query string from 2 const chars. > > const char *language; > language = "'6'"; > const char *sql2 = "SELECT

Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Adam DeVita
>From the point of view of a C question, make your array of characters large enough to hold the characters you want (and terminating null) before copying them in. >From the point of view of an SQL: if you want to change the comparison constant in a where clause, look up bind parameters. read thro

[sqlite] concat 2 const chars ?

2010-07-09 Thread rollerueckwaerts
Hello, I try to get an sql query string from 2 const chars. const char *language; language = "'6'"; const char *sql2 = "SELECT key,name,text FROM uebersetzungen WHERE sprach_id = "; const char *sql = strcpy(sql2,language); // or const char *sql = "SELECT key,name,text FROM u