My bad!
Here's an example of what it produces:
[text]SELECT photos FROM property WHERE (photos REGEXP '^\|+$' OR photos = '' OR photos IS NULL) AND id = '16'[/text]
This section of the code does it if the photoprimary fields is NULL or just empty.
If it's not empty, then it just throws up the "Alert" script anyway. Basically stopping it deleting a field if an image is found.
The one I am looking at that shows no 'Delete' button at all, DOES have text in the 'photos' field:
[text]b1.jpg|b3.jpg|Bm 6 kitchen.jpg|BM 6 bedroom two.jpg[/text]
So it should be producing the "else" part
Code: Select all
else
{
echo "<input type='button' onclick=
\"alert('You have PHOTOS stored. Click Edit, delete all photos, then delete item.')\"
value='Delete'>";
}
.... should it not?