I cannot find prepare method. Only query is available. any supports?
use escape to sanitize use input
escaping is not the same as prepare. prepare can be faster for the same query running multiple times with different bindings.
sad enough, swoole doesn't have it.
mysql support for swoole is built from scratch, obviously prepare just has not been implemented.
so yeah, it's gonna take extra work and got worse performance to do it manually in PHP.
prepare does not give a noticable performance improvement in most cases. pdo does emulated prepare by default for that reason. swoole has very limited contributors. you can manually implement a emulated prepare just like pdo.
@gouchaoer for event-driven server side program, the performance increase a lot.
The prepare method is not currently supported. You can use escape and query instead of prepare.
We will support prepare in this version of 2.0.11
@matyhtf That's great. I am looking forward to this.
@matyhtf is there going to be an info on that in the docs?
Most helpful comment
The
prepare methodis not currently supported. You can useescapeandqueryinstead ofprepare.We will support prepare in this version of 2.0.11