平,
我有一张桌子'文件'我想知道是否可以从这个表中选择并用';'分隔每一列?
$sqlSearchByString = "SELECT fileName as name, description, dimension
FROM {$tableName}
WHERE fileName LIKE '%{$searchedWord}%'
OR description LIKE '%{$searchedWord}%'";
$this->client->execute($sqlSearchByString);
$result = $this->client->fetchAll();
答案 0 :(得分:0)
文档很糟糕,或者我只是看不到列出方法的位置,但这应该是正确的方法:
foreach($this->client->fetchAll() as $row) {
$result[] = implode(';', $row);
}