postgresql ERROR: missing FROM-clause entry for table in JAVA query execution -


i read same kind issue here, everywhere there problems query.

i facing error error: missing from-clause entry table in query, executing if execute manually, not in java back-end code.

this manual query, works when execute in dbms:

insert goods (condo_id, item_title, item_descr, item_email, item_phone, item_price) values (3, 'title', 'bfdescr', 'grergeg@mail.com', '54654654654', '4545'); 

and statement in java:

resultset rs = st.executequery("insert goods (condo_id, item_title, item_descr, item_email, item_phone, item_price) values\n" +                 "(item.condo_id, item.title, item.descr, item.email, item.phone, item.price);"); 

which doesn't work , on after execution got exception error.

this item class. checked, in java back-end, values received , existed.

public class item {     public int condo_id;     public string title;     public string descr;     public string phone;     public string email;     public int price;     } 

for insert, update, delete queries should use statement.executeupdate, select - statement.executequery, javadoc states it.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -