Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在PHP和Android(JSON)中选择AS会导致错误_Php_Mysql - Fatal编程技术网

在PHP和Android(JSON)中选择AS会导致错误

在PHP和Android(JSON)中选择AS会导致错误,php,mysql,Php,Mysql,每次我向SELECT查询添加AS时,Android Logcat都会抛出一个错误。我有两个同名的列,我想重命名它们 SELECT test1 AS test-1, test2 AS test-2, ... and so on. 如果我没有得到结果,则会抛出以下错误: E/JSON Parser14890:解析数据org.JSON.JSONException时出错:的字符0处输入结束 有人能解释一下如何在Select语句中使用AS吗 编辑: Country的名称与allias相同,请尝试

每次我向SELECT查询添加AS时,Android Logcat都会抛出一个错误。我有两个同名的列,我想重命名它们

    SELECT test1 AS test-1, test2 AS test-2, ... and so on.
如果我没有得到结果,则会抛出以下错误:

E/JSON Parser14890:解析数据org.JSON.JSONException时出错:的字符0处输入结束

有人能解释一下如何在Select语句中使用AS吗

编辑:


Country的名称与allias相同,请尝试使用下划线而不是连字符-test-1只是一个示例,我使用下划线。反正我也不工作。有什么想法吗?你能告诉我们完整的问题吗?没有实际的问题很难说。。
    SELECT ship.name, ship.size, ship.country AS coun_1, man.country AS coun_2
    FROM shipp ship JOIN manuf man ON ship.id = man.id;