本文介绍了$ P $在libdbi ppared声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用libdbi提出申请的数据库无关。我想用prepared语句。如何使用prepared与libdbi陈述?所有的例子,我看到用正常选择喇嘛从泡壳其中foo;通过libdbi输入逃逸提供声明和使用转义功能。

I want to use libdbi to make an application database-agnostic. I would like to use prepared statements. How can I use prepared statements with libdbi? All the examples I saw use normal select bla from blub where foo; statements and use escaping functions provided by libdbi for input escaping.

如果这是不可能做到这一点的libdbi,你可以推荐另一个数据库抽象库,可以做到这或解释为什么这样的功能就没有意义了?

If it is not possible to do this in libdbi, can you recommend another db-abstraction-library that can do that or explain why such a feature does not make sense?

推荐答案

不幸的是,libdbi不支持prepared语句。
来源:位于

Unfortunately, libdbi does NOT support prepared statements.Source: libdbi documentation at http://libdbi.sourceforge.net/docs/programmers-guideAlso read this thread at syslog-ng: http://marc.info/?t=129555478500003

如果你不介意C ++,SOCI可能会为你一种替代方案:

If you don't mind C++, SOCI might be an alternative for you:http://soci.sourceforge.net

这篇关于$ P $在libdbi ppared声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 17:38