I'm not sure what those functions you calling are, but basically when you store a picture in a database you dont store the image itself in the database, but only a reference to the image file.
For example, lets say I uploaded an image called "mypic.jpg" into a directory called "user_images" on the server. the URL for the image would be (relative) "user_images/mypic.jpg"
So in my database, when I store the image, I dont store the image code itself, but rather just the URL to the image, so lets say this given table scheme
"ID | Person | Picture"
has in it
"1 | Billy | user_images/mypic.jpg"
when I query the database for rows, I simply include the URL for the image in a <img> tag and the image will display
the <img> tag has to be generated by php of course