|
From: Luis C. <ad...@co...> - 2003-06-11 22:40:21
|
I really don't know why you would want to look for a special symbol at all. The [like] command will match without the % being there. Unfortunately, the [like] also may be using a type of pattern matching symbols. What type of database are you running may be the right question. Is there any docs on pattern matching with [like] for your database manager ?? ----- Original Message ----- From: "Fernando Conceição" <fer...@te...> To: <dev...@li...> Sent: Wednesday, June 11, 2003 4:04 PM Subject: [Dev-C++] Help with sprintf > Hi! In this: > sprintf(sql_lt,"select data,titulo,categoria,anotacao,ROWID from anot > where %s like '%s';",prcampo,prprocurar); > I get something like this: > select data,titulo,categoria,anotacao,ROWID from anot where titulo like > 'mytitle'; > But when I try place a % there is an error, or the value appears wrong > or I get a NULL string, by example, I need this output > select data,titulo,categoria,anotacao,ROWID from anot where titulo like > '%mytitle%'; > I try to place one %, two %(like tell in libc reference), \% and nothing > gives what I want. > Can you show me how to do this? > > Thanks. > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > |