found issue with thumbnail entry into DB
i have an upload form that upon successful thumbnail creation, adds the filename into an array.... An array is also made of filenames for the fullsize as well
The fullsize filenames are insertind into the DB and then i have a loop set up that does this:
//loop through thumbs array
foreach ($uploaded_thumbs_array as $item2){
//split t_filename.extension into ".extension" and "t_filename" and "filename"
$item2_chop_block = explode(".",$item2);
$item2_ext = ".$item2_chop_block[1]";
$item2_filename = "$item2_chop_block[0]";
$item2_t_stripped = str_replace('t_','',$item2_filename);
//insert SQL
$query2 = "UPDATE pics SET thumb_filename = '$item2_filename', thumb_filename_ext = '$item2_ext' WHERE pic_filename = '$item2_t_stripped'";
mysql_select_db($database_db294582132, $db294582132);
mysql_query($query2, $db294582132) or die(mysql_error());
}
What this loop does is that it takes the t_filename(how my settings are set to name thumbs) and breaks off the 't_'
Then it finds the row with that filename and updates it with the name of the thumb.
I was testing all day and using the same 2 files over and over(my settings are set to rename with an incrementing number)
so eventually i got to IMGblah_59... and the thumb filenames were no longer inserted into the DB.....
So i went to my remote server and deleted all the duplicate images.
Retried the upload and the thumbnail insert now works. It wasn't working b/c the incrementing filenames had got too high and it was trippin out for some reason....
The thumb was still saved on the server and named correctly but the name was not inserted into the DB...
any ideas why?