1

我试图在表中插入空行然后获取它的 ID。它正在工作,但它在输出中给了我额外的空行,知道为什么吗?下面的代码:

php:

$query = "INSERT INTO player () VALUES ()";
$mysqli->query($query);

echo  $mysqli->insert_id;

安卓:

HttpGet getRequest = new HttpGet(url);
HttpResponse response = httpclient.execute(getRequest);
String str = EntityUtils.toString(response.getEntity());
System.out.println("row id: " + str + "end");

导致日志:

05-02 00:24:29.163: I/System.out(28787): row id:  14 

05-02 00:24:29.163: I/System.out(28787): 

05-02 00:24:29.163: I/System.out(28787): 

05-02 00:24:29.163: I/System.out(28787): 

05-02 00:24:29.163: I/System.out(28787): 

05-02 00:24:29.163: I/System.out(28787): end
4

0 回答 0