GetAssoc() ADODB Question:
Posted: Fri Jun 03, 2005 9:50 am
I'm using GetAssoc() to return data. This is how it is currently returning:
As you can see the index starts at 178. Is there a way to force GetAssoc() to start at 0 instead of using the first column of the db to order the array?
Here's the code I'm currently using.
Code: Select all
ї178]=> //THIS IS THE PROBLEM
array(11) {
ї"e;id"e;]=>
string(3) "e;178"e;
ї0]=>
string(29) "e;Aesthetics and Visual Culture"e;
ї"e;res_name"e;]=>
string(29) "e;Aesthetics and Visual Culture"e;
ї1]=>
string(45) "e;http://pegasus.cc.ucf.edu/~janzb/aesthetics/
"e;
ї"e;res_url"e;]=>
string(45) "e;http://pegasus.cc.ucf.edu/~janzb/aesthetics/
"e;
ї2]=>
string(7) "e;8388607"e;
ї"e;res_time"e;]=>
string(7) "e;8388607"e;
ї3]=>
string(3) "e;178"e;
ї"e;resource_id"e;]=>
string(3) "e;178"e;
ї4]=>
string(1) "e;5"e;
ї"e;category_id"e;]=>
string(1) "e;5"e;
}Here's the code I'm currently using.
Code: Select all
$resource = $db -> GetAssoc($sql);