Home » Renegade Discussions » Mod Forum » MySQL with SSGM?
Re: MySQL with SSGM? [message #432930 is a reply to message #432883] |
Sat, 17 July 2010 06:57 |
|
TechnoBulldog
Messages: 15 Registered: May 2010 Location: Texas
Karma:
|
Recruit |
|
|
Wow, thanks for the help! It's working now!
I'm also wondering if there is a mysql_real_escape_string function for c++ like there is for PHP. This would help a lot. Also, does anyone have a clue why I get 6 warnings?
Warnings:
Toggle Spoiler
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(47) : warning C4251: 'sql::SQLException::sql_state' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'sql::SQLException'
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(79) : warning C4512: 'sql::SQLException' : assignment operator could not be generated
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(41) : see declaration of 'sql::SQLException'
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(88) : warning C4512: 'sql::MethodNotImplementedException' : assignment operator could not be generated
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(81) : see declaration of 'sql::MethodNotImplementedException'
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(97) : warning C4512: 'sql::InvalidArgumentException' : assignment operator could not be generated
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(90) : see declaration of 'sql::InvalidArgumentException'
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(106) : warning C4512: 'sql::InvalidInstanceException' : assignment operator could not be generated
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(99) : see declaration of 'sql::InvalidInstanceException'
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(116) : warning C4512: 'sql::NonScrollableException' : assignment operator could not be generated
C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include\cppconn/exception.h(109) : see declaration of 'sql::NonScrollableException'
Also, reborn, it was a very simple console application. This was the query in my test console application.
statement->execute("INSERT INTO cms_content(alias, body) VALUES('cplusplus', 'does it work?')");
And the queries I posted in my code (both of which now work):
std::string query = StrFormat("INSERT INTO messages(name, message) VALUES('%s', '%s')", pName, Text[0]);
// Will cause server to crash.
//statement->execute(query);
// Will cause server to crash.
//statement->executeQuery("INSERT INTO messages(name, message) VALUES('tester5', 'testing value')");
But really, thanks for the help everyone! I think this plugin might actually be useful when it's done.
Cloud-Zone Gaming. Check it out.
^^ Awesome right?
|
|
|
Goto Forum:
Current Time: Mon Jan 27 08:07:40 MST 2025
Total time taken to generate the page: 0.00893 seconds
|