Answer the question
In order to leave comments, you need to log in
What's wrong with the request, error: "error: syntax error at end of input"?
There is a query for MySQL:
Trying to run it in pg throws an error
What's wrong?
SELECT * FROM users WHERE user_id = ?
error: syntax error at end of input
Answer the question
In order to leave comments, you need to log in
There is an error in the syntax, for example the table name may contain a space, or the string may have a character that is misinterpreted.
For example, the Delit operation:
This syntax does not work, it’s clear that when you insert a query into the database tool, kuti generates the same error:
const QString request="DELETE FROM \"" + tableName + "\" WHERE name=\""+rowName+"\";";
const QString request="DELETE FROM \"" + tableName + "\"" +
" WHERE name=\'"+ rowName +"\'";
const QString request="INSERT INTO \"" + tableName +"\" ( name ) VALUES ( "+ rowName + " );";
const QString request="INSERT INTO \"" + tableName+ "\" (name) "+
"VALUES ('"+ rowName+ "'); ";
const QString request="INSERT INTO \""+ tableName+"\""+
" ( name ) VALUES (?)";
query.prepare(request);
query.bindValue(0, rowName);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question