Julien, > Can you try to echo the sql query, just to make sure it makes sense. Sorry, not sure what you mean. Any "echo" output will get lost, do you mean an add_log on the SELECT results? -Trev