Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:24:22+00:00 2026-06-10T04:24:22+00:00

I have error with one entry parameter but I dont know why: 0 14:31:47

  • 0

I have error with one entry parameter but I dont know why:

0   14:31:47    call UpdateComment(66,1,2,"NOWYTitle","NOWYContent")    Error Code: 1054. Unknown column 'NOWYTitle' in 'field list'

call procedure:

call UpdateComment(66,1,2,"NOWYTitle","NOWYContent");

my procedure:

DELIMITER $$
DROP PROCEDURE IF EXISTS UpdateComment $$
CREATE PROCEDURE `UpdateComment`(UserId INT,/*Crc32 int(11) unsigned,*/ArticleId int(11),CommentsId int(11), newTitle varchar(255), newContent varchar(255))
BEGIN

        DECLARE helpUserTable varchar(255);

        set helpUserTable = CONCAT("User",UserId);

        set @score1 =CONCAT("UPDATE `",helpUserTable,"` SET Title = ",newTitle," WHERE CommentsId = ",CommentsId," AND ArticleId = ",ArticleId);
        PREPARE stmt FROM @score1;
        EXECUTE stmt;
        DEALLOCATE PREPARE stmt;
        set @score2 =CONCAT("UPDATE `",helpUserTable,"` SET Content = ",newContent," WHERE CommentsId = ",CommentsId," AND ArticleId = ",ArticleId);
        PREPARE stmt FROM @score2;
        EXECUTE stmt;
        DEALLOCATE PREPARE stmt;

END
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:24:24+00:00Added an answer on June 10, 2026 at 4:24 am

    Procedure generates these statements:

    UPDATE `User66` SET Title = NOWYTitle WHERE CommentsId = 2 AND ArticleId = 1
    
    UPDATE `User66` SET Content = NOWYContent WHERE CommentsId = 2 AND ArticleId = 1
    

    They are incorrect, because all literals (string values) must be quoted –

    UPDATE `User66` SET Title = 'NOWYTitle' WHERE CommentsId = 2 AND ArticleId = 1
    
    UPDATE `User66` SET Content = 'NOWYContent' WHERE CommentsId = 2 AND ArticleId = 1
    

    So, change code in this way –

    ...
    SET @score1 = CONCAT("UPDATE `", helpUserTable, "` SET Title = '", newTitle, "' WHERE CommentsId = ", CommentsId, " AND ArticleId = ", ArticleId);
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting error of System.MissingMethodException after I have an optional parameter in one
I have run an ssis package and got error in one of the tasks(the
In my application I am getting this error: You can only have one <head
I can't figure out why I'm getting this error. I only have one class
I have some HTML errors in my output source code, coming from one of
Hello i have error when i am forwarding page without parameter. that is happen
I have a form that creates a new entry into a database. One of
I have a TabControl, and among other tabs I have one called Errors. I
Have error ValueError: time data '2012-03-15 9:45:00 AM' does not match format '%Y-%m-%d %H:%M:%S'
I have error in line 2 and 13 in PHP 5.2, I have no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.