[!--quoteo(post=383316:date=Jun 13 2006, 10:22 AM:name=radalin)--][div class=\'quotetop\']QUOTE(radalin @ Jun 13 2006, 10:22 AM) [snapback]383316[/snapback][/div][div class=\'quotemain\'][!--quotec--] What is the thing that works ok? I didn't get it because you mean that everything is fine with the code at other parts but there is problem with this one? So it's more then a variable problem than a syntax or anything else problem. Because syntax errors returns errors. put an echo command for your qeury just before sending them to the db. You will probably remark that a variable is missing somewhere. Probably you will see: SELECT `data` FROM `char` WHERE `name`='' but I'm not very sure. [/quote] I just want to know what's the correct syntax to use a function inside a query so i can compare the return value of that function with the value 1.