So your trouble now is displaying ALL THE RESULTS in the database? or blank?
Because from what I see, after you put the WHERE clause, its either going to display an error, blank, but don't think it will display everything.
Can you put a
echo mysql_error();
after your mysql_query? So you can see whether there is anything wrong with your sql statement.
Morover I notice there isn't any mysql_connect or pconnect inside the function, did you connect to the database at all in the script? Please double check, mysql_error helps.