close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File upload with database insert error

Thread began 7/17/2012 7:25 am by danielsebas | Last modified 7/17/2012 1:22 pm by danielsebas | 973 views | 4 replies |

danielsebas

File upload with database insert

Hi, I will like to know how to insert the name of the two pictures that are being generated in my database (one big picture in images folder and the little picture in the thumbs folder) just the first resized picture is inserted in the database but the thumb picture name is not inserted, example I upload picture named "pic", the name "pic" is inserted in the database that has some dimensions but the other picture that is resized and saved in another folder as "pic_thumb" is not inserted in the database. How can I insert both names in the database?

Attached Files
fotos_insert.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

if you look in the bindings panel, and expand the WA Uploaded Files (File Field) binding group, you will notice that there is a server file name variable for the image created in the main directory, and another server file name variable for the image created in the pic_thumb directory.

In the insert record behavior, bind the thumbnail column to the server file name variable for the pic_thumb directory.

Sign in to reply to this post

danielsebas

Hi Jason, thank you for your fast reply
I donĀ“t have a thumbnail column, my table has only three columns:

ID = primary key
USRID = foreign key for user
NAME= uploaded file name

So do I have to put another insert behavior or is there a way to use the same behavior to have something like this:

ID USRID NAME
1 4 pic
2 4 pic_thumb

Sign in to reply to this post

Jason ByrnesWebAssist

you would want to edit the database table to have the following columns:
ID = primary key
USRID = foreign key for user
NAME= uploaded file name
ThumbnailName= uploaded thumbnail name

Sign in to reply to this post

danielsebas

Thank you Jason, I did that

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...