Lines Matching refs:id
34 …!$link->query("CREATE TABLE test (id INT auto_increment, label varchar(10) not null, PRIMARY KEY (…
35 !$link->query("INSERT INTO test (id, label) VALUES (null, 'a')")) {
44 printf("[004] Expecting id > 0 got %d, [%d] %s\n", $api_id, $link->errno, $link->error) ;
46 printf("[005] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
57 …printf("[007] API id should have been reset to 0 because previous query was SELECT, got API %d, SQ…
65 if ($link->query("INSERT INTO test (id, label) VALUES (null, null)")) {
72 …printf("[010] API id should have been reset to 0 because previous query was SELECT, got API %d, SQ…
80 if (!$link->query("UPDATE test SET id=LAST_INSERT_ID(id+1)"))
86 printf("[013] Expecting id > 0 got %d, [%d] %s\n", $api_id, $link->errno, $link->error) ;
88 printf("[014] SQL id %d should be equal to API id %d\n", $new_sql_id, $api_id);
90 printf("[015] SQL id %d should have had changed, got %d\n", $sql_id, $new_sql_id);
101 …printf("[017] API id should have been reset to 0 because previous query was SET, got API %d, SQL %…
108 if (!$link->query("INSERT INTO test(id, label) VALUES (LAST_INSERT_ID(id + 1), 'b')"))
114 printf("[020] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
122 printf("[022] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
124 if (!($res = $link->query("SELECT id, label FROM test ORDER BY id ASC")))
129 printf("id = %d, label = '%s'\n", $row['id'], $row['label']);
133 if (!$link->query("INSERT INTO test(label) SELECT CONCAT(label, id) FROM test ORDER BY id ASC"))
139 printf("[025] SQL id %d should be equal to API id %d\n", $sql_id, $api_id);
141 …if ($link->query("INSERT INTO test(id, label) SELECT id, CONCAT(label, id) FROM test ORDER BY id A…
147 …printf("[027] API id should have been reset to 0 because previous query failed, got API %d, SQL %d…
154 /* API insert id will be 101 because of UPDATE, SQL unchanged */
155 …if (!$link->query(sprintf("INSERT INTO test(id, label) VALUES (%d, 'z') ON DUPLICATE KEY UPDATE id…
161 printf("[030] API id should be %d got %d\n", $sql_id, $api_id);
166 if (!($res = $link->query("SELECT id, label FROM test ORDER BY id ASC")))
171 printf("id = %d, label = '%s'\n", $row['id'], $row['label']);
184 id = %d, label = 'b'
185 id = %d, label = 'a'
186 id = %d, label = 'c'
188 id = %d, label = 'b'
189 id = %d, label = 'a'
190 id = %d, label = 'c'
191 id = %d, label = 'a%d'
192 id = %d, label = 'c%d'
193 id = 101, label = 'b%d'