I have my query in $myquery. I need to find whether it contains "where" wording. if find "where", then I want to add "and" instead of "where".
I used
if (INSTR(1,$myquery,'where')>0){

}

I got fatal error. undefined instr() function.

Which syxtex should I use?

Thanks!

hongmei

    Hi,

    Try to use substr_count()

    by example:
    print substr_count("This is a test", "is"); // prints out 2

    see you

      Write a Reply...