Chinaunix首页 | 论坛 | 博客
  • 博客访问: 271395
  • 博文数量: 55
  • 博客积分: 2030
  • 博客等级: 大尉
  • 技术积分: 737
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-13 18:06
文章分类

全部博文(55)

文章存档

2011年(2)

2010年(7)

2009年(17)

2008年(29)

我的朋友

分类: Mysql/postgreSQL

2008-12-04 16:58:05

版本3.0.8

/home/jzj/project/alv115/tools_needed/mysql++-3.0.8/bk-deps g++ -c -o simple1_simple1.o -Ilib -I/usr/include/mysql -g -O2 ./examples/simple1.cpp g++ -o simple1 simple1_simple1.o -L. -lmysqlclient -lmysqlpp_excommon -lmysqlpp

There are three major ways to execute a query in MySQL++: Query::execute(), Query::store(), and Query::use().
execute() is for queries that do not return data per se. For instance, CREATE INDEX. You do get back some information from the MySQL server, which execute() returns to its caller in a object.If you only need the success status, it’s a little more efficient to call Query::exec() instead, as it simply returns bool.
 
If your query does pull data from the database, the simplest option is store(). (All of the examples up to this point have used this method.) This returns a object,
阅读(1435) | 评论(0) | 转发(0) |
0

上一篇:通过模板实现

下一篇:mysql的几点使用

给主人留下些什么吧!~~