Lines Matching refs:stmt
23 $stmt = mysqli_stmt_init($link);
25 mysqli_stmt_attr_set($stmt, 0, 0);
30 $stmt->prepare("SELECT * FROM test");
33 mysqli_stmt_attr_set($stmt, -1, 0);
39 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, -1);
43 $stmt->close();
49 $stmt = mysqli_stmt_init($link);
50 $stmt->prepare("SELECT label FROM test");
51 $stmt->execute();
52 $stmt->store_result();
53 $res = $stmt->result_metadata();
62 $stmt->close();
65 $stmt = mysqli_stmt_init($link);
66 $stmt->prepare("SELECT label FROM test");
67 var_dump($stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 1));
68 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
71 $stmt->execute();
72 $stmt->store_result();
73 $res = $stmt->result_metadata();
82 $stmt->close();
85 $stmt = mysqli_stmt_init($link);
86 $stmt->prepare("SELECT label FROM test");
87 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 0);
88 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
91 $stmt->execute();
92 $stmt->store_result();
93 $res = $stmt->result_metadata();
102 $stmt->close();
109 $stmt = mysqli_stmt_init($link);
110 $stmt->prepare("SELECT id, label FROM test");
114 $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, -1);
119 …if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_FOR_UPDATE)…
122 …if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_SCROLLABLE)…
125 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
128 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
131 $stmt->close();
133 $stmt = mysqli_stmt_init($link);
134 $stmt->prepare("SELECT id, label FROM test");
135 $stmt->execute();
137 $stmt->bind_result($id, $label);
139 while ($stmt->fetch())
141 $stmt->close();
145 $stmt = mysqli_stmt_init($link);
146 $stmt->prepare("SELECT id, label FROM test");
147 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
149 $stmt->execute();
151 $stmt->bind_result($id, $label);
153 while ($stmt->fetch())
155 $stmt->close();
162 $stmt = mysqli_stmt_init($link);
163 $stmt->prepare("SELECT id, label FROM test");
164 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
166 $stmt->execute();
168 $stmt->bind_result($id, $label);
170 while ($stmt->fetch())
172 $stmt->close();
184 $stmt = mysqli_stmt_init($link);
185 $stmt->prepare("SELECT id, label FROM test");
188 $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 0);
193 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 1)))
195 $stmt->execute();
197 $stmt->bind_result($id, $label);
199 while ($stmt->fetch())
201 $stmt->close();
206 $stmt = mysqli_stmt_init($link);
207 $stmt->prepare("SELECT label FROM test");
208 if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, -1)))
210 $stmt->close();
212 $stmt = mysqli_stmt_init($link);
213 $stmt->prepare("SELECT label FROM test");
214 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, PHP_INT_MAX)))
216 $stmt->close();
218 $stmt = mysqli_stmt_init($link);
219 $stmt->prepare("SELECT id, label FROM test");
220 if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_PREFETCH_ROWS, 2)))
222 $stmt->execute();
224 $stmt->bind_result($id, $label);
226 while ($stmt->fetch())
228 $stmt->close();