From ea90ef1398353d60321b8e1c0705690570084fc4 Mon Sep 17 00:00:00 2001 From: Jie Date: Thu, 26 Dec 2024 15:01:51 +0800 Subject: [PATCH] mysql_query return 0 when success --- include/sqlConnection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sqlConnection.h b/include/sqlConnection.h index 22715f9..575da41 100644 --- a/include/sqlConnection.h +++ b/include/sqlConnection.h @@ -155,7 +155,7 @@ public: std::expected Execute(std::string_view command){ auto res = mysql_query(&mysql_client, command.data()); - if(!res) + if(res) return std::unexpected(get_error_msg()); return res; }