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

rating

delete button changing all rows' column content

Thread began 1/02/2018 8:39 am by Jamie | Last modified 1/02/2018 2:40 pm by Ray Borduin | 326 views | 6 replies |

Jamie

delete button changing all rows' column content

Hi Ray and Happy New Year!

On the attached update page, there is a 'delete' button which, when clicked, replaces the contents of the PageImage column to 'noimage' - the problem is that clicking the delete button changes all rows PageImage column to noimage when it should be just the row that is selected for that update.

not sure wht I have done wrong?

Cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it would work.

Try adding some debug code after line 202 like:
die($WA_Sql);

That is the SQL statement running and it might explain why all rows are updated.

Sign in to reply to this post

Jamie

thanks Ray

am getting

UPDATE `service_contents` SET `PageImage` = 'noimage' WHERE `PageImage`='bg-slider-service-balance.jpg'

at the moment, all PageImages are using the same image bg-slider-service-balance.jpg although the client has the ability to update each individual row if they so choose

Sign in to reply to this post

Ray BorduinWebAssist

So that is why. You should be using the autonumber column as the unique field in your update statement and when setting the value of the DeleteImage hidden field. You can update that manually on lines 181 and 484.

Sign in to reply to this post

Jamie

gotcha...have made that chanege but its not actually replacing the PageImage column with 'noimage' - it actually doesnt look to be be doing anything ?

have attached the updated page

Sign in to reply to this post

Ray BorduinWebAssist

It looks right.... write the SQL statement to the page again like you did before and see if it looks right. View source on the page and make sure that the hidden field is populated properly.

Sign in to reply to this post

Jamie

got it thanks

needed to change

$WA_indexField = "PageImage";
$WA_fieldNamesStr = "ServicesID";

to

$WA_indexField = "ServicesID";
$WA_fieldNamesStr = "PageImage";



all working now

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