我正在使用谷歌驱动器php库来访问api驱动器上的谷歌工作表。
工作表的第一行包含列标题。
$httpClient = new GuzzleHttpClient(['headers' => $headers]);
// This code works just fine and retrieves all rows of the sheet:
$resp = $httpClient->request('GET', $url);
但是,我想根据一列中的值检索行的子集。 我已经尝试了这些方法中的每一种,它们都返回所有行而不是子集。
$resp = $httpClient->request('GET', $url, ['query' => 'county=Sonoma']);
$resp = $httpClient->request('GET', $url, ['query' => ['county' => 'Sonoma']]);
$resp = $httpClient->request('GET', $url.'?county=Sonoma');
我开始认为我需要以不同的方式引用"县"列。有人对我如何完成这项工作有任何想法吗?
提前谢谢。
我发现这有效:
$resp = $httpClient->request('GET', $url.'?sq=county=Sonoma');