PHP: Hypertext Preprocessor (original) (raw)
SqlStatement::bind
(No version information available, might only be in Git)
SqlStatement::bind — Bind statement parameters
Description
Warning
This function is currently not documented; only its argument list is available.
Return Values
Examples
Example #1 mysql_xdevapi\SqlStatement::bind() example
Found A Problem?
6 years ago
bind using example: <?php try { $session = mysql_xdevapi\getSession("mysqlx://user:password@host"); } catch(Exception $e) { die("Connection could not be established: " . $e->getMessage()); } <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi><mi>t</mi><mi>m</mi><mi>t</mi><mo>=</mo></mrow><annotation encoding="application/x-tex">stmt = </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em;"></span><span class="mord mathnormal">s</span><span class="mord mathnormal">t</span><span class="mord mathnormal">m</span><span class="mord mathnormal">t</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span></span></span></span>session->sql("SELECT * FROM table WHERE id=? AND data=?"); $stmt->bind(1); $stmt->bind("data"); <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>r</mi><mi>e</mi><mi>s</mi><mi>u</mi><mi>l</mi><mi>t</mi><mo>=</mo></mrow><annotation encoding="application/x-tex">result = </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">res</span><span class="mord mathnormal">u</span><span class="mord mathnormal">lt</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span></span></span></span>stmt->execute();?>