Lines Matching refs:stmt
24 $stmt = mysqli_stmt_init($link);
26 mysqli_stmt_attr_set($stmt, 0, 0);
31 $stmt->prepare("SELECT * FROM test");
34 mysqli_stmt_attr_set($stmt, -1, 0);
40 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, -1);
44 $stmt->close();
50 $stmt = mysqli_stmt_init($link);
51 $stmt->prepare("SELECT label FROM test");
52 $stmt->execute();
53 $stmt->store_result();
54 $res = $stmt->result_metadata();
63 $stmt->close();
66 $stmt = mysqli_stmt_init($link);
67 $stmt->prepare("SELECT label FROM test");
68 var_dump($stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 1));
69 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
72 $stmt->execute();
73 $stmt->store_result();
74 $res = $stmt->result_metadata();
83 $stmt->close();
86 $stmt = mysqli_stmt_init($link);
87 $stmt->prepare("SELECT label FROM test");
88 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 0);
89 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
92 $stmt->execute();
93 $stmt->store_result();
94 $res = $stmt->result_metadata();
103 $stmt->close();
110 $stmt = mysqli_stmt_init($link);
111 $stmt->prepare("SELECT id, label FROM test");
115 $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, -1);
120 …if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_FOR_UPDATE)…
123 …if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_SCROLLABLE)…
126 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
129 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
132 $stmt->close();
134 $stmt = mysqli_stmt_init($link);
135 $stmt->prepare("SELECT id, label FROM test");
136 $stmt->execute();
138 $stmt->bind_result($id, $label);
140 while ($stmt->fetch())
142 $stmt->close();
146 $stmt = mysqli_stmt_init($link);
147 $stmt->prepare("SELECT id, label FROM test");
148 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
150 $stmt->execute();
152 $stmt->bind_result($id, $label);
154 while ($stmt->fetch())
156 $stmt->close();
163 $stmt = mysqli_stmt_init($link);
164 $stmt->prepare("SELECT id, label FROM test");
165 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
167 $stmt->execute();
169 $stmt->bind_result($id, $label);
171 while ($stmt->fetch())
173 $stmt->close();
185 $stmt = mysqli_stmt_init($link);
186 $stmt->prepare("SELECT id, label FROM test");
189 $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 0);
194 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 1)))
196 $stmt->execute();
198 $stmt->bind_result($id, $label);
200 while ($stmt->fetch())
202 $stmt->close();
207 $stmt = mysqli_stmt_init($link);
208 $stmt->prepare("SELECT label FROM test");
209 if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, -1)))
211 $stmt->close();
213 $stmt = mysqli_stmt_init($link);
214 $stmt->prepare("SELECT label FROM test");
215 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, PHP_INT_MAX)))
217 $stmt->close();
219 $stmt = mysqli_stmt_init($link);
220 $stmt->prepare("SELECT id, label FROM test");
221 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 2)))
223 $stmt->execute();
225 $stmt->bind_result($id, $label);
227 while ($stmt->fetch())
229 $stmt->close();