Lines Matching refs:id
21 $stmt = $db->prepare('SELECT id, label FROM test ORDER BY id ASC LIMIT 2');
23 $id = $label = null;
25 if (!$stmt->bindColumn(1, $id, PDO::PARAM_INT))
35 printf("id = %s (%s) / label = %s (%s)\n",
36 var_export($id, true), gettype($id),
38 $data[] = array('id' => $id, 'label' => $label);
41 $stmt = $db->query('SELECT id, label FROM test ORDER BY id ASC LIMIT 2');
44 if ($row['id'] != $data[$index]['id']) {
45 printf("[005] Fetch bound and fetch assoc differ - column 'id', bound: %s/%s, assoc: %s/%s\n",
46 var_export($data[$index]['id'], true), gettype($data[$index]['id']),
47 var_export($row['id'], true), gettype($row['id']));
61 $stmt = $db->prepare('SELECT id, label FROM test ORDER BY id ASC LIMIT 2, 2');
63 $id = $label = null;
65 if (!$stmt->bindColumn(1, $id, PDO::PARAM_INT))
75 printf("id = %s (%s) / label = %s (%s)\n",
76 var_export($id, true), gettype($id),
78 $data[] = array('id' => $id, 'label' => $label);
81 $stmt = $db->query('SELECT id, label FROM test ORDER BY id ASC LIMIT 2, 2');
84 if ($row['id'] != $data[$index]['id']) {
85 printf("[010] Fetch bound and fetch assoc differ - column 'id', bound: %s/%s, assoc: %s/%s\n",
86 var_export($data[$index]['id'], true), gettype($data[$index]['id']),
87 var_export($row['id'], true), gettype($row['id']));
111 id = 1 (integer) / label = 'a' (string)
112 id = 2 (integer) / label = 'b' (string)
113 id = 3 (integer) / label = 'c' (string)
114 id = 4 (integer) / label = 'd' (string)