Lines Matching refs:stmt
13 $stmt = mysqli_stmt_init($link);
15 mysqli_stmt_attr_set($stmt, 0, 0);
20 $stmt->prepare("SELECT * FROM test");
23 mysqli_stmt_attr_set($stmt, -1, 0);
29 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, -1);
33 $stmt->close();
39 $stmt = mysqli_stmt_init($link);
40 $stmt->prepare("SELECT label FROM test");
41 $stmt->execute();
42 $stmt->store_result();
43 $res = $stmt->result_metadata();
50 $stmt->close();
53 $stmt = mysqli_stmt_init($link);
54 $stmt->prepare("SELECT label FROM test");
55 var_dump($stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 1));
56 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
59 $stmt->execute();
60 $stmt->store_result();
61 $res = $stmt->result_metadata();
68 $stmt->close();
71 $stmt = mysqli_stmt_init($link);
72 $stmt->prepare("SELECT label FROM test");
73 $stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 0);
74 $res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
77 $stmt->execute();
78 $stmt->store_result();
79 $res = $stmt->result_metadata();
86 $stmt->close();
93 $stmt = mysqli_stmt_init($link);
94 $stmt->prepare("SELECT id, label FROM test");
98 $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, -1);
103 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
106 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
109 $stmt->close();
111 $stmt = mysqli_stmt_init($link);
112 $stmt->prepare("SELECT id, label FROM test");
113 $stmt->execute();
115 $stmt->bind_result($id, $label);
117 while ($stmt->fetch())
119 $stmt->close();
123 $stmt = mysqli_stmt_init($link);
124 $stmt->prepare("SELECT id, label FROM test");
125 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
127 $stmt->execute();
129 $stmt->bind_result($id, $label);
131 while ($stmt->fetch())
133 $stmt->close();
140 $stmt = mysqli_stmt_init($link);
141 $stmt->prepare("SELECT id, label FROM test");
142 … if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY)))
144 $stmt->execute();
146 $stmt->bind_result($id, $label);
148 while ($stmt->fetch())
150 $stmt->close();