Assuming the mysql table has two fields (username,picture).
And $user contains the value of the username to search for (ishmell),
$table contains the name of the mysql table and
$limit contains the total number of results to return (initially set to 2).
Change the value of $limit to the maximum number of pictures you want displayed.
Also assuming there can be multiple entries for username with different values for picture,
and you want the pictures to be displayed horizontally,
then this code will do what you want.
Note: The picture files must be stored on the server and the name of the picture files (including the path if applicable) must be stored in the picture field in the mysql table.
Also note: I am displaying the results in a table, but you can display them any way you want.