When trying to access my image file from my database i get this error:
Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\drupal-7.25\sites\all\modules\database\database_ex.module on line 99
note: line 99 is $uri = $value['url'];
function database_ex_form_submission($uri) {
$result = db_query("SELECT myimage FROM example");
$records = $result->fetchAll();
$res = $result->execute();
foreach ($records as $value) {
$uri = $value['url'];
$url = file_create_url($uri);
}
}
What seems to be the problem?