I'd like to 'glue' some string together. I'm doing it like this :
#include <stdio.h>
#include <stdlib.h>
main()
{
char dbQuery[] = "";
const char DeelmonsterTabelZendvlag[] = "deelmonster_im.zendvlag";
const char DeelmonsterTabelLabID[] = "deelmonster_im.lab_id";
const char DeelmonsterWachttabel[] = "w_deelmonster_im";
const char MonsterTabelPuntID[] = "monster_im.pntim_id";
const char DeelmonsterTabelID[] = "deelmonster_im.dlmim_id";
sprintf(dbQuery, "%s%s%s%s%s",
"INSERT INTO ", DeelmonsterWachttabel,
" (dlmim_id, pntim_id, lab_id, dat_monstername, zendvlag,
geannuleerd)",
" SELECT ", DeelmonsterTabelID);
printf("%s\n", dbQuery);
}
But the output is :
INSERT INTO w_deelmonster_im (dlmim_id, pntim_id, lab_id, dat_monstername,
zendvlag, geannuleerd) SELECT eerd) SELECT m.dlmim_id
You see, from the " SELECT", it prints completly wrong ... what is the
problem ?
thx
-------------------------------------------------------------------------
De Messemaeker Johan
Research & Development
HEMMIS n.v.
Koning LeopoldIII-laan 2, 8500 Kortrijk
Tel.: 32 (0)56/37.26.37
Fax: 32 (0)56/37.23.24
Current Project : VMM Aalst