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 8687793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:11:57+00:00 2026-06-12T23:11:57+00:00

I have this problem: If I write the following query: INSERT INTO prodotto (Barcode,

  • 0

I have this problem:
If I write the following query:

INSERT INTO prodotto  (Barcode, InseritoDa,  DataInserimento, UrlImage) 
VALUES  ('vfr','ff','12-10-2012', 'vfr.jpg')    

I get this error message:

Error Code: 1054. Unknown column 'InseritoDa' in 'where clause'

But in the table prodotto i have this column and its name InseritoDa.

Where am I wrong?
the error may be due to the fact that the field InseritoDa is a foreign key that points to another table called utente?

the trigger associated to the table is:

-- Trigger DDL Statements
DELIMITER $$

USE `m4af`$$

CREATE
DEFINER=`root`@`localhost`
TRIGGER `m4af`.`IncrementaProdottiInseritiUtente`
AFTER INSERT ON `m4af`.`prodotto`
FOR EACH ROW
update utente as u
set ProdottiInseriti= (select ProdottiInseriti from utente where username= InseritoDa)+1
where u.username = InseritoDa$$
  • 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-12T23:11:58+00:00Added an answer on June 12, 2026 at 11:11 pm

    Since the error states that it occurred in a WHERE clause there might be an insert-trigger that executes another query and fails. There is no WHERE clause in your insert statement.

    Edit

    Try to edit your INSERT trigger like this:

    update utente
    set ProdottiInseriti = ProdottiInseriti + 1
    where username = NEW.InseritoDa
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, I have this weird problem: This following statement works Query q =
I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)
This is Uday. I have a problem with the write performance with a small
I have a problem with SetFetchMode call in Criteria API in following query: DetachedCriteria.For<User>()
I've wrote this simple piece of code. And I have a slight problem with
I have this problem: I want to generate a new source code file from
I have this problem: $id is id for each user $img = 'http://www.somesite.com/pictures/'; $no_img
I have this problem since I'm beginning in OOP programming I want to close
I have this problem when I run SAS 9.2 on the command line on
I have this problem, when I load my form, the validation messages appears in

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.