Total Posts: 141
This might sounds like a stupid question but I would like to know how to write a mysql query in magento.
I’ve got this:
$conn = $this->getConnection();
$this->_select = $conn->select()->from(array('main_table' => $this->getResource()->getMainTable()), array('*')
->where('`date_from` >= ?',$date_start)
->where('`date_to` <= ?',$date_stop)
but it doesn’t lead me anywhere. Not sure I understand it fully.
Basically I have 2 dates, I want to query everything in between the two dates.
Thansk for your help.