Hello, I have this code:
// query string;
QString queryString
("SELECT * FROM merchandize WHERE PicPath="%1
";");
queryString.arg(strPicPath);
// query string;
QString queryString("SELECT * FROM merchandize WHERE PicPath="%1";");
queryString.arg(strPicPath);
To copy to clipboard, switch view to plain text mode
Once I try to compile it, I get following error:
CMerchandizeBrowser.
cpp: In member function `
QString CMerchandizeBrowser
::getMerchandizeName(QString)':CMerchandizeBrowser.cpp:330: error: invalid operands of types `const char[41]' and `int' to binary `operator%'
CMerchandizeBrowser.cpp: In member function `QString CMerchandizeBrowser::getMerchandizeName(QString)':
CMerchandizeBrowser.cpp:330: error: invalid operands of types `const char[41]' and `int' to binary `operator%'
To copy to clipboard, switch view to plain text mode
I need those quotes because SQL syntax. Please help!
Bookmarks