close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

update removing entries from the db

Thread began 3/31/2015 9:39 am by Jamie | Last modified 4/06/2015 2:51 pm by Ray Borduin | 2248 views | 8 replies |

Jamie

update removing entries from the db

Hi Jason

In the attached _update, I have added a 'delete' button which have got working ok. However, now if I click on update, it removes all images enties altogether in the db. Not sure what I have done wrong as I have added a hidden image field for each image.....

any advice gratefully received

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

In the file upload, you are using the WADAproducts recordset for the default file setting, for example:
'DefaultFileName' => "".($row_WADAproducts["ProductImage"]) ."",


That recordset is after the upload file behavior at lines 272 - 282. to be able to use the recordset values in the upload file behavior, you will need to move the recordset so that it is before the upload behaviors.

Sign in to reply to this post

Jamie

The reason I put it after was because when submitting the delete, it wasnt refreshing the page to show that the entry had been 'deleted' and only showed on a page refresh or navigating away to another page and coming back....

I have put it back above the upload behaviours and its back to doing that...

Sign in to reply to this post

Jason ByrnesWebAssist

if you want to keep it after the update, then you should use hidden form elements, and bind them to the file columns from the recordset, then in the upload behavior, bind the default file name to the hidden form elements.

Sign in to reply to this post

Jamie

thats great, thanks Jason - I just had the wrong element bound in the upload behaviour. all sorted

on update, have noticed that the £ sign changes to A£ ( as per http://prntscr.com/6o2b3p ) - any idea why that would be happening? page is set to utf-8 etc.... (I know I can get round it by using £ instead of £ but just more curiousity as to what might be happening to cause this than anything else

cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

Make sure the database table and column is also set to utf-8 and the database connection. It sounds like a charset mismatch somewhere.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

Thanks Ray. Its not related to the database at all... its just a char that is hard coded to the page itself....

Sign in to reply to this post

Ray BorduinWebAssist

You could try updating the header with php:

php:
<?php header('Content-type: text/html; charset=utf-8'); ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

oki doki

cheers Ray

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