1
This commit is contained in:
parent
d73ff7eb0c
commit
645913c9d4
@ -143,7 +143,8 @@ namespace a8
|
|||||||
int Query::ExecQuery(const char* querystr, std::vector<a8::XValue> args)
|
int Query::ExecQuery(const char* querystr, std::vector<a8::XValue> args)
|
||||||
{
|
{
|
||||||
impl_->FreeLastDataSet();
|
impl_->FreeLastDataSet();
|
||||||
int err = mysql_query(impl_->Conn(), FormatSql(querystr, args).c_str());
|
std::string real_sql = FormatSql(querystr, args).c_str();
|
||||||
|
int err = mysql_query(impl_->Conn(), real_sql.c_str());
|
||||||
if(err == 0){
|
if(err == 0){
|
||||||
impl_->mysqlres = mysql_store_result(impl_->Conn());
|
impl_->mysqlres = mysql_store_result(impl_->Conn());
|
||||||
if(RowsNum() > 0){
|
if(RowsNum() > 0){
|
||||||
@ -157,7 +158,8 @@ namespace a8
|
|||||||
bool Query::ExecScript(const char* scriptstr, std::vector<a8::XValue> args)
|
bool Query::ExecScript(const char* scriptstr, std::vector<a8::XValue> args)
|
||||||
{
|
{
|
||||||
impl_->FreeLastDataSet();
|
impl_->FreeLastDataSet();
|
||||||
return mysql_query(impl_->Conn(), FormatSql(scriptstr , args).c_str()) == 0;
|
std::string real_sql = FormatSql(scriptstr , args).c_str();
|
||||||
|
return mysql_query(impl_->Conn(), real_sql.c_str()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Query::FormatSqlEx(const char* fmt, std::vector<a8::XValue> args)
|
std::string Query::FormatSqlEx(const char* fmt, std::vector<a8::XValue> args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user