查询语句中的P4sql和连接


p4sql and concatenation in query statement

我最近开始使用P4Report中的p4sql,它工作得很漂亮,除了我的结果在几个查询中没有字段之间的空格。这没什么大不了的,只要我可以在每个字段的末尾添加一个字符,这样我就可以在该字符上中断,但是在我的字段之间连接字符后,我没有得到任何数据。

下面是一个查询的例子,但在我的结果中留下空格,所以我不能将每行返回的不同字段分开:

            $cmd = "C:'''"Program Files'"'Perforce'P4Report'p4sql -u test -P 42B3ABC#################### -s '"select client, description, host from clients where description like '%: ".$area."%' '"";
        exec($cmd, $output);

这是我想要做的添加一个字符来打破。这在SQL中工作得很好,但不是通过p4sql,有什么想法吗?

$cmd = "C:'''"Program Files'"'Perforce'P4Report'p4sql -u test -P 42B3ABC#################### -s '"select client+'||'+description+'||'+host from clients where description like '%: ".$area."%' '"";
        exec($cmd, $output);

上面的代码每行返回null:数组([0]=> [1]=> (expr) [2 ] => ====== [ 3) =>空[4]=>零[5]=>空[6]=>零[7]=>空[8]=>空零[10][9]=> =>空零[12][11]=> => NULL)

找到了- p4sql使用sql92语法。1992年我7岁。

下面是正确的语法:
$cmd = "C:'''"Program Files'"'Perforce'P4Report'p4sql -u test -P 42B3ABC#################### -s '"select client||' '||description, host from clients where description like '%: ".$area."%' '"";
    exec($cmd, $output);