According to their docs you only need 3 images, and you'd probably do well to only keep the address of one image in your database.
Then on your file system have 3 images you create elsewhere, but always adhere to a strict naming convention:
id | dog_name | image
2 | bozo | /dogs/bozo.jpg
(with that naming convention you could even get away with not storing the image name)
Then it will be quite easy to generate the necessary matching code that cloud zoom requires. Use PHP to output the necessary vars into each loop.
You could also use the id number alone as the identifier as they show in their demo code.
<a href='/images/dogs/bozo-large.jpg' class='cloud-zoom-gallery' title='Bozo'
rel="useZoom: 'zoom1', smallImage: '/images/dogs/bozo.jpg' ">
<img src="/images/dogs/bozo-medium.jpg" alt = "Bozo"/></a>
You may have other reasons to store 4 image paths in your database table, but setting up a naming convention and following it would probably be enough to use this jQuery code.
<a href='/images/zoomengine/bigimage00.jpg' class='cloud-zoom-gallery' title='Thumbnail 1'
rel="useZoom: 'zoom1', smallImage: '/images/zoomengine/smallimage.jpg' ">
<img src="/images/zoomengine/tinyimage.jpg" alt = "Thumbnail 1"/></a>
<a href='/images/zoomengine/bigimage01.jpg' class='cloud-zoom-gallery' title='Thumbnail 2'
rel="useZoom: 'zoom1', smallImage: ' /images/zoomengine/smallimage-1.jpg'">
<img src="/images/zoomengine/tinyimage-1.jpg" alt = "Thumbnail 2"/></a>
<a href='/images/zoomengine/bigimage02.jpg' class='cloud-zoom-gallery' title='Thumbnail 3'
rel="useZoom: 'zoom1', smallImage: '/images/zoomengine/smallimage-2.jpg' ">
<img src="/images/zoomengine/tinyimage-2.jpg" alt = "Thumbnail 3"/></a>