I have a custom module with its own table which saves the date inside the column named date_to
.
I am trying to access the values from only this column but when I load the collection and call getData('date_to')
I get the whole collection and not just the date_to
column.
Here is what I have tried so far:
$date = Mage::getModel('namespace_modulename/tablename')->getData('date_to');
print_r($date);
When I do print_r($date);
I get the whole collection even though I have specified in parenthesis the I only want the date_to column values.
I know I'm missing out an important piece and would like for some help please.
Best Answer
Thanks for the help, I had to loop over the collection like below: