Hi Roybut,
First of all let me say there are no stupid questions, only those too stupid to ask. :)
Ok, now I have thought of a couple of things that could be happening here. First of all, are the two code snippets in separate php files? If so, have you included the first file in the second by a call to include or require? Also, is the get_item function a function inside a class? If so, it needs to be called by classname::get_item(...); One way to check that your query is being created correctly is to put an echo statement immediately before the call to mysql_query, like so:
echo $query;
item_set = ... ; This will tell you if your query is correct or not, just don't forget to remove the line later after you have finished debugging.
Anyway, this might be a start to helping you work out what is going on. Let us know if this hasn't fixed it.
Cheers,
d