1

Utilizing the MySQL Native Driver, you can use the MYSQLI_ASYNC flag with the mysqli_query function to make parallel, asynchronous MySQL DB calls.

I get how all that works, but what I'd really like to be able to do is somehow use the MYSQLI_ASYNC flag with the prepared statement set of functions in PHP.

Is this possible, and if so, how?

HartleySan
  • 7,404
  • 14
  • 66
  • 119
  • http://php.net/manual/en/mysqli.reap-async-query.php looks vaguely related to what you are asking. – apokryfos Apr 01 '16 at 15:15
  • Thanks for the comment. I don't see how that works with potentially async prepared statements though. – HartleySan Apr 01 '16 at 15:25
  • 1
    I'm also looking for this. I can't seem to find anything. Looks like the answer is no. I am also surprised there are no mysqli wrappers that support MYSQLI_ASYNC. – Dustin Graham Apr 22 '16 at 18:59
  • Yes, the answer does seem to be no. I just ended up using mysqli_real_escape_string to clean the user-supplied parameters before running the queries. Seems to work fine. – HartleySan Apr 23 '16 at 16:58
  • Thanks HartleySan. I'm about to do the same thing. Wish they would explicitly state that in the docs. – Dustin Graham Apr 23 '16 at 19:16

0 Answers0