There's nothing that sticks out at me, other than that IDs are generally stored as integers. Are you positive it's a VARCHAR?
When you're developing something, you should be debugging it. So, use mysql_error() if a query fails, to see why it failed.
-
$query = "SELECT * FROM `tbl1` WHERE 1";
-
$query_result = mysql_query( $query ) or die ( mysql_error() );
-
As soon as the query is stored in
$query_result, if there's an error, your page will die with the cause of the error displayed, e.g. 'tbl1 doesn't exist'.