MySQL error: "Incorrect table name ``": [was: please help me]

the script language is php & mysql database
i created 2 files :
the first : i made in it the following steps :
1- created recordset
2- dragged and dropped one field which i need to delete
3- put ( delete ) word and linked it with the second page by parameter id
and the second page : i made a blank page with one recordset and made it filter by ( id )
next, from insert menu clicked on data objects , insert record and delete record
after that when i preview the the first page in the browser and click in ( delete ) link
the massege appeared is :
Incorrect table name ''
the first page php code :
<?php require_once('../Connections/dwcon.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
$maxRows_rscomment = 10;
$pageNum_rscomment = 0;
if (isset($_GET['pageNum_rscomment'])) {
  $pageNum_rscomment = $_GET['pageNum_rscomment'];
$startRow_rscomment = $pageNum_rscomment * $maxRows_rscomment;
mysql_select_db($database_dwcon, $dwcon);
$query_rscomment = "SELECT * FROM `comment`";
$query_limit_rscomment = sprintf("%s LIMIT %d, %d", $query_rscomment, $startRow_rscomment, $maxRows_rscomment);
$rscomment = mysql_query($query_limit_rscomment, $dwcon) or die(mysql_error());
$row_rscomment = mysql_fetch_assoc($rscomment);
if (isset($_GET['totalRows_rscomment'])) {
  $totalRows_rscomment = $_GET['totalRows_rscomment'];
} else {
  $all_rscomment = mysql_query($query_rscomment);
  $totalRows_rscomment = mysql_num_rows($all_rscomment);
$totalPages_rscomment = ceil($totalRows_rscomment/$maxRows_rscomment)-1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>التحكم في التعليقات</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#contmain #main #page #content table tr td div strong {
    color: #0F0;
-->
</style>
</head>
<body>
<!-- start header -->
<div id="contmain">
<div id="menu">
        <ul>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="../index.php"></a></li>
        </ul>
    </div>
<div id="main">
<div id="header">
<div id="logo">
    <h1><a href="../index.php"></a><a href="" id="metamorph"></a></h1>
    </div>       
<!-- end header -->
</div>
<!-- start page -->
<div id="page">
  <div align="center">
    <!-- start sidebar two -->
  </div>
  <div id="sidebar2" class="sidebar">
      <ul>
          <li>
                <h2> </h2>
                <div class="title_back">
                <ul>
                  <table width="130" height="136" border="0">
                    <tr>
                      <td height="47" bgcolor="#99CC66"><h1><a href="cp.php">اللوحة الرئيسية</a></h1></td>
                      <td bgcolor="#99CC66"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                    </tr>
                    <tr>
                      <td height="40" bgcolor="#99CC33"><h1><strong>المقالات</strong></h1></td>
                      <td bgcolor="#99CC33"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                    </tr>
                    <tr>
                      <td height="41" bgcolor="#99CC66"><h1><strong><a href="logout.php">تسجيل الخروج</a></strong></h1></td>
                      <td bgcolor="#99CC66"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                    </tr>
                  </table>
                  <li></li>
                </ul>
            </div>
          </li>
          <li>
                <h2> </h2>
                <div class="title_back">
                  <ul>
                  <li><!-- end sidebar two -->
    <!-- start content -->
</li>
                </ul>
                </div>
          </li>
      </ul>
  </div>
  <div id="content">
            <div class="box">
             <div class="box2">
            <h4 align="right"><a href="#"></a></h4>
            <p> </p>
            <p> </p>
             </div>
            </div>
            <?php do { ?>
              <table width="299" border="0" align="center" cellpadding="5" cellspacing="5">
                <tr>
                  <td colspan="2" bgcolor="#006666"><div align="center"><strong>العمليات</strong></div></td>
                  <td width="154" bgcolor="#006666"><div align="center"><strong>العنوان</strong></div></td>
                </tr>
                <tr>
                  <td width="42" bgcolor="#99CC66"><p><img src="../images/icons/Multiply, delete.png" width="43" height="40" alt="hh" /></p>
                    <p><a href="deletecomment.php?comm_id=<?php echo $row_rscomment['comm_id']; ?>">حذف</a></p></td>
                  <td width="53" bgcolor="#99CC66"><p><img src="../images/icons/Configuration Files or Utilities.png" width="44" height="39" alt="yy" /></p>
                    <p><a href="updatecomment.php?comm_id=<?php echo $row_rscomment['comm_id']; ?>">تعديل</a></p></td>
                  <td bgcolor="#99CC66"><?php echo $row_rscomment['comment']; ?></td>
                </tr>
              </table>
  <p> </p>
              <div class="box">
            <div class="box2"> </div></div>
              <?php } while ($row_rscomment = mysql_fetch_assoc($rscomment)); ?>
  </div>
    <!-- end content -->
    <div id="bottom" style="clear: both;"></div>
</div><!-- end page -->
<!-- start footer -->
<div id="footer">
    <h1>&copy;</h1>
    <h1><a href=http://www.metamorphozis.com/" title="Flash Website Templates"></a>
        </h1>
</div>
</div>
</div>
<!-- end footer -->
<div style="text-align: center; font-size: 0.75em;"></div></body>
</html>
<?php
mysql_free_result($rscomment);
?>
the second page php code is :
<?php require_once('../Connections/dwcon.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
  $deleteSQL = sprintf("DELETE FROM ``comment`` WHERE comm_id=%s",
                       GetSQLValueString($_GET['comm_id'], "text"));
  mysql_select_db($database_dwcon, $dwcon);
  $Result1 = mysql_query($deleteSQL, $dwcon) or die(mysql_error());
  $deleteGoTo = "commentcontrol.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $deleteGoTo));
$colname_Recordset1 = "-1";
if (isset($_GET['comm_id'])) {
  $colname_Recordset1 = $_GET['comm_id'];
mysql_select_db($database_dwcon, $dwcon);
$query_Recordset1 = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $dwcon) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_rscomment = "-1";
if (isset($_GET['comm_id'])) {
  $colname_rscomment = $_GET['comm_id'];
mysql_select_db($database_dwcon, $dwcon); 
$query_rscomment = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_rscomment, "int")); 
$rscomment = mysql_query($query_rscomment, $dwcon) or die(mysql_error()); 
$row_rscomment = mysql_fetch_assoc($rscomment); 
$colname_rsdeletecomment = "-1";
if (isset($_GET['comm_id'])) {
  $colname_rsdeletecomment = $_GET['comm_id'];
mysql_select_db($database_dwcon, $dwcon);
$query_rsdeletecomment = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_rsdeletecomment, "int"));
$rsdeletecomment = mysql_query($query_rsdeletecomment, $dwcon) or die(mysql_error());
$row_rsdeletecomment = mysql_fetch_assoc($rsdeletecomment);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>حذف التعليق</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- start header -->
<div id="contmain">
<div id="menu">
        <ul>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="../index.php"></a></li>
        </ul>
    </div>
<div id="main">
<div id="header">
<div id="logo">
    <h1><a href="../index.php"></a><a href="http://www.metamorphozis.com/" id="metamorph"></a></h1>
    </div>       
<!-- end header -->
</div>
<!-- start page -->
<div id="page">
  <div align="center">
    <!-- start sidebar two -->
  </div>
  <div id="sidebar2" class="sidebar">
      <ul>
          <li>
                <h2> </h2>
                <div class="title_back">
                <ul><li></li>
                </ul>
                </div>
          </li>
          <li></li>
          <li>
            <div class="title_back"> </div>
            </li>
        </ul>
    </div><!-- end sidebar two -->
    <!-- start content -->
<div id="content">
            <div class="box">
             <div class="box2">
            <h4 align="right"> </h4>
<p> </p>
             </div>
            </div>
<p> </p>
            <div class="box">
        <div class="box2"> </div></div>        
    </div>
    <!-- end content -->
    <div id="bottom" style="clear: both;"></div>
</div><!-- end page -->
<!-- start footer -->
<div id="footer">
    <p>&copy; </p>
    <p><a href="http://www.metamorphozis.com/" title="Flash Website Templates"></a>
        </p>
</div>
</div>
</div>
<!-- end footer -->
<div style="text-align: center; font-size: 0.75em;"></div></body>
</html>
<?php
mysql_free_result($Recordset1);
?>--------------------------------------------------------------------

When posting in a forum like this, please give your post a meaningful subject line. It helps everyone, including others who might have the same problem, and are looking for a solution.
The cause of your error message almost certainly lies in your second page, which has this code:
if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
$deleteSQL = sprintf("DELETE FROM ``comment`` WHERE comm_id=%s",
GetSQLValueString($_GET['comm_id'], "text"));
What's causing the problem is the extra pair of backticks around `comment`. It should be this:
if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
  $deleteSQL = sprintf("DELETE FROM `comment` WHERE comm_id=%s",
                GetSQLValueString($_GET['comm_id'], "text"));

Similar Messages

  • Member acces profile error(A table name, specified in an sql command)

    Hi friends,
    In my bpc application(A) below 3 dims are secure dims.
    1. entiiy  (std)
    2. category (std)
    3. location (custom dim)
    while defining one member access profile,
    Read Only      : CATEGORY 100
    Read & Write      : CATEGORY 200,500
    for whatever combinatio i use, for other secure dims (eg: category,location where base member,or parent members ) i'm getting below error  message
    A table name, specified in an sql command, is unknown.
    We are on bpc75nw sp04.
    Pls suggest us .
    dump(st22):
    Short text
        A table name, specified in an SQL command, is unknown.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_UJE_MEMACCESS_CACHE========CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "REMOVE_MEMACCESS" "(METHOD)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        An invalid table name "/1CPMB/RDWCSUMAS" was specified in an Open SQL command:
        Due to one of the following reasons, the error occurs only at runtime:
        - the table name was specified dynamically, or
        - the SELECT clause, WHERE clause, GROUP-BY clause, HAVING clause, or
          ORDER-BY clause was specified dynamically.
    Thanks,
    naresh
    Edited by: Naresh P on Feb 19, 2011 10:40 AM

    Hi Naresh,
    As far as I know You have specify Explicit Access to all the dimensions mentioned as Secured in your Application.
    You can't skip the secured Dimesions.
    In your case if you want to restrict only one dimension for 1 Member Access Profile then give Read & Write access to other 2 Dimensions and select ALL members.
    This might solve your problem.
    Hope it helps.
    Chaithanya

  • Ichat can't connect to my AIM account, gives me the error "Cannot log in to AIM. General error. Try again." Please help!

    ichat can't connect to my AIM account, gives me the error "Cannot log in to AIM. General error. Try again." Please help!

    HI,
    Your specs say OS X 10.6.8 which would be iChat 5.x.x in Snow Leopard.
    This version by default tries to login in to the AIM server called login.oscar.aol.com on port 5190 using the TCP protocol.
    An internet connection is made up of 65535 of these so called ports (more like TV stations)
    Most routers have ports up to port 1024 which means some of the iChat Login Ports are above this.
    Two ways to Solve this.
    1) Change the Login port iChat uses
    2) Change the way the router opens ports.
    For 1) go to iChat Menu > Preferences > Accounts
    Highlight/select the AIM account.
    In the Info Tab deselect the "Enable this Account" to make sure you are Logged out.
    In the Server Settings change the Port to 443
    You can decide not to use SSL as well if you wish  (the server name automatically loses the leading "s")
    For 2) log in to the routers set up pages and make sure it is doing UPnP
    This allows the computers  to tell the router which ports to open. It also allows multiple devices to use the same ports.
    For iChat this allows it to Screen Share as this happens on an unlisted random port.
    Opps  forgot a couple of things.
    If you are using an APple ID registed at Apple ending in @mac.com @me.com or @iCloud.com then the passowrd at Apple has to be 16 characters or less to work with the AIM servers.
    Additionally the iCloud issued @me.com and @iCloud.com one require you to use iChat 6 in Lion or Messages in Mountian Lion due to changes Apple made to the security of letting AIM "read" the passwords.
    9:38 PM      Sunday; June 9, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously
    Message was edited by: Ralph Johns (UK)

  • Cant download itunes, because ' there is an error with windows installer package' please help?

    cant download itunes, because ' there is an error with windows installer package' please help?

    I am getting the same message when I try to install the latest version of iTunes, I am running on Windows Vista Home Premium. I have tried so many different things to try to correct this and have now completly unistalled it from my laptop..... Now I have no iTunes what-so-ever on it and still can't install it. I found an older versin of iTunes and it installed without any problems, but I can't access it because my library was created on a newer version! Talk about frustrated..... WE NEED HELP!!!!!

  • What is Adobe Business Catalyst error Status: 503, 105002 ?  Please help.

    What is Adobe Business Catalyst error Status: 503, 105002 ?  Please help.

    HI PRB-FEC,
    There was an issue earlier today.  Is this now resolved for you?
    - http://status.businesscatalyst.com/
    If not please provide the site in question so we can help investigate further. 
    Kind regards,
    -Sidney

  • Hello apple.help me network iphone 4 use ios7.12 error network.acoount icloud apple please help support errors no service network.thank you

    hello apple.help me network iphone 4 use ios7.12 error network.acoount icloud.apple please help support errors no service network.thank you
    <Personal Information Edited by Host>

    tran ngoc nhan,
    Viết bằng tiếng mẹ đẻ của bạn?
    Tôi đoán Việt Nam?
    Chúng tôi có thể dịch!
    Nói cho tất cả vấn đề của bạn!
    Cung cấp cho nhiều chi tiết!
    Nếu không Việt Nam, dịch này ở đây!
    https://translate.google.com/
    Write in your native language?
    I guess Vietnamese?
    We can translate!
    Tell all your problem!
    Give much detail!
    If not Vietnamese, translate this here!
    https://translate.google.com/
    CCC

  • Password Policy creation error: Incorrect Domain Name

    Hi folks,
    I'm getting rather strange error ("Incorrect Domain Name") while trying to create a new Password Policy in OAM to enable user account lockout. I provide a name for the Password Policy, and use simple Policy Domain I've created as "Password Policy Domain", plus some basic values. I realize it's something simple, yet I cannot figure why the domain name would be incorrect.
    Any help is greatly appreciated.
    Thank you
    Roman

    In the password policy domain field you have to enter the base dn for the user to which this policy will be applied. something like ou=users,dc=company,dc=com
    Check the directory profile of the user store.

  • I am unable to set up my iphone 5 after reset since am getting a error stating 'unable to reach server' . i tried restoring the same from my computer  but  i get a error stating server unavailable' .  please help me as my phone is stuck at the set up page

    i am unable to set up my iphone 5 after reset since am getting a error stating 'unable to reach server' . i tried restoring the same from my computer  but  i get a error stating server unavailable' .  please help me as my phone is stuck at the set up page. so i have already tried recovery mode as well.

    Contact Apple support for warranty service.

  • TS1368 I am recieving the following message when attempting to sign into my iTunes store - An unknown error has occurred. can someone please help me I have reset my password but still unable to log in. help!!

    I am recieving the following message when attempting to sign into my iTunes store - An unknown error has occurred. can someone please help me I have reset my password but still unable to log in. help!!

    I am recieving the following message when attempting to sign into my iTunes store - An unknown error has occurred. can someone please help me I have reset my password but still unable to log in. help!!

  • HT4061 i have a iphone 3gs and recently I Erase All Contents and Settings, now my phone is asking me to update to itunes but when I do it comes up with the message...error 10.15, can someone please help?

    i have a iphone 3gs and recently I Erase All Contents and Settings, now my phone is asking me to update to itunes but when I do it comes up with the message...error 10.15, can someone please help?

    Your headline says iPhone 3GS, but your text says 3G.
    iPhone 3G is not compatible with iOS5. 3GS is.

  • TS3694 I'm trying to update my Iphone Software to the the new IOS 7 but it says there as an uknown error (6). Can someone please help me? Thanks

    I'm trying to update my Iphone Software to the the new IOS 7 but it says there as an uknown error (6). Can someone please help me? Thanks

    http://support.apple.com/kb/TS3694
    Check the section on
    Errors related to third-party security software

  • HT4061 my iphone not connented with itunes unkown error is disply 0xe8000012 so please help me

    my iphone not connented with itunes unkown error is disply 0xe8000012 so please help me

    Read here:
    http://support.apple.com/kb/TS3221

  • I deleted my microsoft office:mac 2011 word from my toolbar. I have Mac OS X version 10.6.8.  I tried to reinstall but it won't work. I get an error message each time. Please help!!!!!!!!!!!!!!

    I deleted my microsoft office:mac 2011 word from my toolbar. I have Mac OS X version 10.6.8.  I tried to reinstall but it won't work. This has never happened before.  I get an error message each time. Please help!!!!!!!!!!!!!!  I don't have time machine. 

    By Toolbar, do you mean the Dock?  The Translucent bar normally at the bottom of the screen, but sometimes at the right or left side?
    If that's what you mean, the Dock is merely a shortcut to what is already inside the Applications folder's Microsoft Office 2011 folder.  If you have Word inside your Microsoft Office 2011 folder, you can drag it back to the Dock.
    If you deleted the Microsoft Office folder, or it is empty, you'll have to reinstall it. 
    If you don't have your registration code, you'll have to call Microsoft for a new one.

  • Please i am unable to restore my ipad due to error 3194.The restore process stalls when it gets to the point where the firmwarwe is being updated.error message 3194 comes up.please help me

    please i am unable to restore my ipad due to error 3194.The restore process stalls when it gets to the point where the firmwarwe is being updated.error message 3194 comes up.please help me

    http://support.apple.com/kb/TS3694#error3194 
    Unable to contact the iOS software update server gs.apple.com

  • When i update my iphone it say error 1015 what is this please help me

    when i update my iphone it say error 1015 what is this please help me

    Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
    http://support.apple.com/kb/TS3694#error1015.

Maybe you are looking for

  • What are the Netweaver components?

    hi guru's, plz help me about NW components.and with explenation. regards, reddy

  • Standard and actual costing run

    I am doing actual coting run ckmlcp every month end on last of the month. stadard costing run I am doing on start of the month on 1st day of the month before actual transactions taking place. Here the problem is I already did the stadard costing and

  • How to hide a tab(not a conditional display)

    I allready posted this question, but nobody answered me... Please help. Here is the thread, just read the last message: how to hide a tab dynamically Vitaly

  • 2 MP4 Videos one plays one does not

    I have two MP4 Videos one playes and one does not. Both are h.264 Baseline profile,  Level 3,  AAC 2 channel audio Every transcode of the movie that will not play fails also. Any help on h.264 setting that Media Manager will take.

  • Ipod displaying a monochrome non-animated version of the battery icon...

    I think my ipod's battery is depleted and when i connect it to the USB port in my computer, it shows a monochrome non-animated version of the battery icon...the troubleshooter says that the ipod will turn on in abt 30 minutes...however i have waited