I should of clarified myself a bit more. The original script when uploading the full-size pic uploads it to the obj_pictures directory and automatically creates the thumb in the same folder.
So in the folder you will have 2 images (e.g. image1.jpg and thmb_image1.jpg).
The db only stores the name of the full-size pic which in this case would be image1.jpg and the img_id which links it to the id of the first query. There is no value img value linking it to the data what so ever if no pic was uploaded. Thats where my problem is.
If you notice the queries there are 3. The first one stores all the information for the property (e.g. Discription, Location, etc.). The second one stores the image information if the image was uploaded (e.g. id, img_id, img_name, img_discription). And the third is the category (e.g. For Sale, For Rent, etc.).
So what I want it to do is that if no image was ever uploaded to display the No Picture Available image. Right now withthe script as is, it displays the red x and of course if there was an image uploaded it will display it correctly.
Thanks for responding any suggestions would be gratefully appreciated.