How to see the results of my first module
hook_views_query_alter() is supposed to alter the query passed as second parameter, or the view object passed as first argument, not to output anything. If you want to debug the hook, you should use code similar to the following one.

watchdog('my_module', 'View: @view', array('@view' =&gt; print_r($view, TRUE)), WATCHDOG_DEBUG);


The name you gave to your hook is wrong: You just need to replace hook with the short name of your module. For a hook like hook_views_query_alter(), the function name is not my_module_hook_views_query_alter(), but my_module_views_query_alter().