I don't see any documentation or core code to specifically address Insert ... On Duplicate update...

So is the only alternative to write a strait DB::query(); call?

有帮助吗?

解决方案

No, this is not supported by the QB.

Currently the FuelPHP Query Builder has a generic SQL generator, independent of the target platform, so it can generate ANSI SQL only. ON DUPLICATE KEY is MySQL specific.

For version 2.0, the entire Query Builder is being rewritten at the moment to support platform specific SQL dialects. Support for this specific statement is however not on the roadmap.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top