1 Star 0 Fork 130

huifeng/cppweb

forked from 寻根/cppweb 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
cpptest.cpp 595 Bytes
Copy Edit Raw Blame History
寻根 authored 2020-09-05 12:22 +08:00 . cppweb.1.0.0版本
#include <webx/menu.h>
class MainApplication : public webx::Application
{
public:
int process()
{
//获取请求参数
param_string(key);
param_string(value);
//初始化数据库配置
webx::InitDatabase();
sp<DBConnect> db = webx::GetDBConnect();
LogTrace(eINF, "获取数据库连接成功");
sp<QueryResult> rs = db->query("SELECT ?", DateTime::ToString());
if (rs)
{
sp<RowData> row;
while (row = rs->next())
{
json["datetime"] = row->getString(0);
}
}
//返回数据
out << json;
return XG_OK;
}
};
START_WEB_APP(MainApplication)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/huifeng_github/cppweb.git
git@gitee.com:huifeng_github/cppweb.git
huifeng_github
cppweb
cppweb
master

Search