close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

found issue with thumbnail entry into DB

Thread began 1/12/2010 4:57 pm by deafboyz_audio386924 | Last modified 1/20/2010 2:41 pm by deafboyz_audio386924 | 1138 views | 7 replies


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?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...