Lines Matching refs:id
35 …!$link->query("CREATE TABLE test (id INT auto_increment, label varchar(10) not null, PRIMARY KEY (…
36 !$link->query("INSERT INTO test (id, label) VALUES (null, 'a')")) {
45 printf("[004] Expecting id > 0 got %d, [%d] %s\n", $api_id, $link->errno, $link->error) ;
47 printf("[005] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
58 …printf("[007] API id should have been reset to 0 because previous query was SELECT, got API %d, SQ…
66 if ($link->query("INSERT INTO test (id, label) VALUES (null, null)")) {
73 …printf("[010] API id should have been reset to 0 because previous query was SELECT, got API %d, SQ…
81 if (!$link->query("UPDATE test SET id=LAST_INSERT_ID(id+1)"))
87 printf("[013] Expecting id > 0 got %d, [%d] %s\n", $api_id, $link->errno, $link->error) ;
89 printf("[014] SQL id %d should be equal to API id %d\n", $new_sql_id, $api_id);
91 printf("[015] SQL id %d should have had changed, got %d\n", $sql_id, $new_sql_id);
102 …printf("[017] API id should have been reset to 0 because previous query was SET, got API %d, SQL %…
109 if (!$link->query("INSERT INTO test(id, label) VALUES (LAST_INSERT_ID(id + 1), 'b')"))
115 printf("[020] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
123 printf("[022] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
125 if (!($res = $link->query("SELECT id, label FROM test ORDER BY id ASC")))
130 printf("id = %d, label = '%s'\n", $row['id'], $row['label']);
134 if (!$link->query("INSERT INTO test(label) SELECT CONCAT(label, id) FROM test ORDER BY id ASC"))
140 printf("[025] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
142 …if ($link->query("INSERT INTO test(id, label) SELECT id, CONCAT(label, id) FROM test ORDER BY id A…
148 …printf("[027] API id should have been reset to 0 because previous query failed, got API %d, SQL %d…
155 /* API insert id will be 101 because of UPDATE, SQL unchanged */
156 …if (!$link->query(sprintf("INSERT INTO test(id, label) VALUES (%d, 'z') ON DUPLICATE KEY UPDATE id…
162 printf("[030] API id should be %d got %d\n", $sql_id, $api_id);
167 if (!($res = $link->query("SELECT id, label FROM test ORDER BY id ASC")))
172 printf("id = %d, label = '%s'\n", $row['id'], $row['label']);
185 id = %d, label = 'b'
186 id = %d, label = 'a'
187 id = %d, label = 'c'
189 id = %d, label = 'b'
190 id = %d, label = 'a'
191 id = %d, label = 'c'
192 id = %d, label = 'a%d'
193 id = %d, label = 'c%d'
194 id = 101, label = 'b%d'