Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Delete Record

Guest
Aug 18, 2008 Aug 18, 2008

Copy link to clipboard

Copied

I have created a user list that when I click on a link to delete a record it goes to a page where I have created a button called delete user in a form tag.

My issue is that I have been going over this issue where I cannot seem to delete a user and when I click on my button called delete user I get an error that states "Incorrect table name". I really do not know why I am getting this error.

In my user list the link that goes to the deletion page is as follows...
delete.php?userID=<?php echo $row_userIDs['userID']; ?>

My delete.php page has the record set as follows...
SELECT *
FROM `user`
WHERE userID = colname

Name: colname
Type: Numeric
Default value: -1
Runtime value: $_GET['userID']

I do have a hidden field.
<input name="userID" type="hidden" id="userID" value="<?php echo $row_getUser['userID']; ?>" />

For my delete record it states as follows...
First check if variable is defined: Primary key value
Connection: conMyConnection
Table: user
Primary key column: userID [Check Box active] Numeric
Primary key value: Form Variable [userID]
After deleting , go to: index.php

I do not know what I am doing wrong. I tried different settings for the delete record wizard but still not luck. I am wondering if it is a DWCS3 setup because when I used to work on DWMX2004 and I am doing the same steps I would not get an error. So right now I am at a lost trying to figure out am I missing something here, maybe the position of the codes.

Has anyone experienced this issue and resolved it.
TOPICS
Server side applications

Views

455
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Aug 23, 2008 Aug 23, 2008
I have found the solution. Some how Dreamweaver CS3 adds ' ' to the SQL statement.

Dreamweaver adds the following...
$query_getUser = sprintf("SELECT * FROM '' 'user' WHERE 'userID' = %s", GetSQLValueString($colname_getUser, "int"));

What it should be is the following...
$query_getUser = sprintf("SELECT * FROM user WHERE userID = %s", GetSQLValueString($colname_getUser, "int"));

Is there a function in Dreamweaver CS3 to take out these quotes rather than doing it manually.

Votes

Translate
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

Try this:

First check if variable is defined: URL Parameter userID

Primary key value: URL Parameter userID

--
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com


"AdonaiEchad" <webforumsuser@macromedia.com> wrote in message
news:g8d2ih$b2c$1@forums.macromedia.com...
>I have created a user list that when I click on a link to delete a record
>it
> goes to a page where I have created a button called delete user in a form
> tag.
>
> My issue is that I have been going over this issue where I cannot seem to
> delete a user and when I click on my button called delete user I get an
> error
> that states "Incorrect table name". I really do not know why I am getting
> this
> error.
>
> In my user list the link that goes to the deletion page is as follows...
> delete.php?userID=<?php echo $row_userIDs['userID']; ?>
>
> My delete.php page has the record set as follows...
> SELECT *
> FROM `user`
> WHERE userID = colname
>
> Name: colname
> Type: Numeric
> Default value: -1
> Runtime value: $_GET['userID']
>
> I do have a hidden field.
> <input name="userID" type="hidden" id="userID" value="<?php echo
> $row_getUser['userID']; ?>" />
>
> For my delete record it states as follows...
> First check if variable is defined: Primary key value
> Connection: conMyConnection
> Table: user
> Primary key column: userID [Check Box active] Numeric
> Primary key value: Form Variable [userID]
> After deleting , go to: index.php
>
> I do not know what I am doing wrong. I tried different settings for the
> delete
> record wizard but still not luck. I am wondering if it is a DWCS3 setup
> because when I used to work on DWMX2004 and I am doing the same steps I
> would
> not get an error. So right now I am at a lost trying to figure out am I
> missing something here, maybe the position of the codes.
>
> Has anyone experienced this issue and resolved it.
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: Newsgroup User
Try this:

First check if variable is defined: URL Parameter userID
Yes, it is defined as URL Parameter userID

Primary key value: URL Parameter userID
Primary key is URL Parameter userID

All systems check, what's next.
--
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com


"AdonaiEchad" <webforumsuser@macromedia.com> wrote in message
news:g8d2ih$b2c$1@forums.macromedia.com...
>I have created a user list that when I click on a link to delete a record
>it
> goes to a page where I have created a button called delete user in a form
> tag.
>
> My issue is that I have been going over this issue where I cannot seem to
> delete a user and when I click on my button called delete user I get an
> error
> that states "Incorrect table name". I really do not know why I am getting
> this
> error.
>
> In my user list the link that goes to the deletion page is as follows...
> delete.php?userID=<?php echo $row_userIDs['userID']; ?>
>
> My delete.php page has the record set as follows...
> SELECT *
> FROM `user`
> WHERE userID = colname
>
> Name: colname
> Type: Numeric
> Default value: -1
> Runtime value: $_GET['userID']
>
> I do have a hidden field.
> <input name="userID" type="hidden" id="userID" value="<?php echo
> $row_getUser['userID']; ?>" />
>
> For my delete record it states as follows...
> First check if variable is defined: Primary key value
> Connection: conMyConnection
> Table: user
> Primary key column: userID [Check Box active] Numeric
> Primary key value: Form Variable [userID]
> After deleting , go to: index.php
>
> I do not know what I am doing wrong. I tried different settings for the
> delete
> record wizard but still not luck. I am wondering if it is a DWCS3 setup
> because when I used to work on DWMX2004 and I am doing the same steps I
> would
> not get an error. So right now I am at a lost trying to figure out am I
> missing something here, maybe the position of the codes.
>
> Has anyone experienced this issue and resolved it.
>




Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

You said your delete record states as follows:

First check if variable is defined: Primary key value
Connection: conMyConnection
Table: user
Primary key column: userID [Check Box active] Numeric
Primary key value: Form Variable [userID]
After deleting , go to: index.php

I said try this instead:

First check if variable is defined: URL Parameter [userID]
Connection: conMyConnection
Table: user
Primary key column: userID [Check Box active] Numeric
Primary key value: URL Parameter [userID]
After deleting , go to: index.php


--
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com


"AdonaiEchad" <webforumsuser@macromedia.com> wrote in message
news:g8fr2u$4vc$1@forums.macromedia.com...
>
quote:

Originally posted by: Newsgroup User
> Try this:
>
> First check if variable is defined: URL Parameter userID
> Yes, it is defined as userID
>
> Primary key value: URL Parameter userID
> Primary key is userID
>
> All systems check, what's next.
> --
> Ken Ford
> Adobe Community Expert Dreamweaver/ColdFusion
> Fordwebs, LLC
> http://www.fordwebs.com
>
>
> "AdonaiEchad" <webforumsuser@macromedia.com> wrote in message
> news:g8d2ih$b2c$1@forums.macromedia.com...
> >I have created a user list that when I click on a link to delete a record
> >it
> > goes to a page where I have created a button called delete user in a
> > form
> > tag.
> >
> > My issue is that I have been going over this issue where I cannot seem
> > to
> > delete a user and when I click on my button called delete user I get an
> > error
> > that states "Incorrect table name". I really do not know why I am
> > getting
> > this
> > error.
> >
> > In my user list the link that goes to the deletion page is as follows...
> > delete.php?userID=<?php echo $row_userIDs['userID']; ?>
> >
> > My delete.php page has the record set as follows...
> > SELECT *
> > FROM `user`
> > WHERE userID = colname
> >
> > Name: colname
> > Type: Numeric
> > Default value: -1
> > Runtime value: $_GET['userID']
> >
> > I do have a hidden field.
> > <input name="userID" type="hidden" id="userID" value="<?php echo
> > $row_getUser['userID']; ?>" />
> >
> > For my delete record it states as follows...
> > First check if variable is defined: Primary key value
> > Connection: conMyConnection
> > Table: user
> > Primary key column: userID [Check Box active] Numeric
> > Primary key value: Form Variable [userID]
> > After deleting , go to: index.php
> >
> > I do not know what I am doing wrong. I tried different settings for the
> > delete
> > record wizard but still not luck. I am wondering if it is a DWCS3 setup
> > because when I used to work on DWMX2004 and I am doing the same steps I
> > would
> > not get an error. So right now I am at a lost trying to figure out am I
> > missing something here, maybe the position of the codes.
> >
> > Has anyone experienced this issue and resolved it.
> >
>
>

>
>
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

I have changed everything to the following...
First check if variable is defined: URL Parameter [userID]
Connection: conMyConnection
Table: user
Primary key column: userID [Check Box active] Numeric
Primary key value: URL Parameter [userID]
After deleting , go to: index.php

I am still getting the same error message "Incorrect table name".

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 23, 2008 Aug 23, 2008

Copy link to clipboard

Copied

LATEST
I have found the solution. Some how Dreamweaver CS3 adds ' ' to the SQL statement.

Dreamweaver adds the following...
$query_getUser = sprintf("SELECT * FROM '' 'user' WHERE 'userID' = %s", GetSQLValueString($colname_getUser, "int"));

What it should be is the following...
$query_getUser = sprintf("SELECT * FROM user WHERE userID = %s", GetSQLValueString($colname_getUser, "int"));

Is there a function in Dreamweaver CS3 to take out these quotes rather than doing it manually.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines