[eluser]CroNiX[/eluser]
Your query or logic in the model doesn't make any sense to me.
It retrieves only a single row in the database, and it doesn't care which one. You are also assigning $query more than once in there. I would assume since the name of the method is CostumerIDbyUser that you want to use a WHERE in your query, so you get a specific user.
So after you retrieve a single row of the database, you check to see if the user id is blank or null. If it is you return 0. If it isn't, you don't return ANYTHING.
So I'm not really sure what you're trying to accomplish here, but it doesn't look right the way it is.
I'm sure there are errors going on, but you are suppressing them which is why you see a blank page. You need to enable error reporting, enable display_errors in php as well as have database debug enabled to see what's going on here.