草庐IT

php - 类 : ADORecordSet_mysql Easy way to get an Array indexed by id of row

coder 2023-10-21 原文

我有一个主键名为“id”的表,我正在使用 ADODB 并返回 ADORecordSet_mysql。我需要一个数组,其中 id 与结果集中的一行相关联,但 ADODBRecordSet_mysql 似乎只有一个 GetArray(int startingRow) 方法,该方法返回一个由开始行索引的数组(默认值为 0)。

我不想遍历这个结果集,将 id 与自己的每一行关联起来,我不喜欢必须将起始索引传递给 GetArray 的想法。我宁愿能够使用我的主键索引数组来取回数组。

这是可能的还是我的头在云端?

最佳答案

http://phplens.com/lens/adodb/docs-adodb.htm#getassoc1

关于php - 类 : ADORecordSet_mysql Easy way to get an Array indexed by id of row,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3249121/

有关php - 类 : ADORecordSet_mysql Easy way to get an Array indexed by id of row的更多相关文章

随机推荐