Skip to main content
June 14, 2008
Question

DELETE RECORD NOT WORKING

  • June 14, 2008
  • 3 replies
  • 892 views
I posted this under the General Forum, but noticed that other Delete Record questions going back to 2006 have zero responses. This must be a hard one. Can anyone help?

Page 1: form to enter a Style No. This is the recordset filter to a Master page.

Page 2: deletesize1.php - Master page has a repeating region with a Go To Detail server behaviour. It passes the URL: ID (primary key) to the detail page. (basic Master/Detail page stuff)

Page 3: deletesize2.php - the Detail page shows ONE record (the size/color combination that needs to be deleted). There is link on this page (text: Confirm Delete) that passes the URL to the Delete Page.

Page 4: deletesize3.php - The Delete Page. Everything works beautifully until you get to the Delete Page. I get an error message says: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' " WHERE ID=4642' at line 1.

4642 IS THE CORRECT ID. But the WHERE statement is NOT at Line 1.

What does this error mean and why is the above not working? It appears to be BY THE BOOK.

I created a link to the code: go to www.thescrubsite.com and you will see a link called "MURRAY" in the footer.

Anyone up to the task?

Evie
This topic has been closed for replies.

3 replies

Participating Frequently
June 17, 2008
Thanks for the info
Inspiring
June 14, 2008
Good luck!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"EviePhillips" <webforumsuser@macromedia.com> wrote in message
news:g31cpv$2jh$1@forums.macromedia.com...
>I figured it out. I have reviewed the code many times and thought it
>strange
> that there two sets of single quotes around the name of the table ( ' '
> size '
> ' ). I didn't code the WHERE statement manually, I used the fitered
> recordset
> to do it. So I didn't think I should screw with it.
>
> On a whim, I went into the code and deleted one of the single quotes on
> each
> side. I didn't expect it to work, but, VOILA! It is fixed.
>
> Sorry to trouble all of you with my problems.
>
> Evie
>
>

June 14, 2008
I figured it out. I have reviewed the code many times and thought it strange that there two sets of single quotes around the name of the table ( ' ' size ' ' ). I didn't code the WHERE statement manually, I used the fitered recordset to do it. So I didn't think I should screw with it.

On a whim, I went into the code and deleted one of the single quotes on each side. I didn't expect it to work, but, VOILA! It is fixed.

Sorry to trouble all of you with my problems.

Evie
Participant
October 12, 2012

Good Job Evie.

I have been looking for the reason why this delete action wasn't working for a couple of weeks! There is something wrong with the DW behavior (obviously). I’m surprised it hasn't been picked up in times past by an expert or David Powers himself?

The DW behavior worked with the localhost MAMP mysql but not with the remote mysql database.

Thank you, thank you.

David_Powers
Inspiring
October 13, 2012

tunedup wrote:

I’m surprised it hasn't been picked up in times past by an expert or David Powers himself?

Maybe it's because experts don't use Dreamweaver server behaviors. I stopped using them years ago. Maybe it's time you did, too.