Page 1 of 1

Wilcards in Variables?

Posted: Fri Aug 13, 2004 1:55 am
by Hebbs
Am having difficulty with including a wildcard within a variable.

To cut a long story short I am have an application where I want users to be able to configure their own wildcard searches e.g. '%findthis' etc.

When the search criteria containing the wildcard is carried forward (as a variable) and submitted in a query I continuously get an error message stating 'Warning: printf(): Too few arguments in ....' where ... defines the code line.

I can code the wildcard into the Select statement but I would rather the users construct their own.

Any thoughts?

Hebbs

Posted: Fri Aug 13, 2004 2:11 am
by feyd
% in the format string of the printf variants are control characters. you need to either switch which functions you use to print, or escape the % with %%...

[Solved] Wilcards in Variables?

Posted: Fri Aug 13, 2004 3:08 am
by Hebbs
Doh!

Thanks for the solution, amazing how sometimes you just cant see things!

Appreciate that!

Hebbs