SELECT
a.`user_id`,
b.`user_name`,
a.`date`,
a.`value`
FROM
`values` AS a
JOIN
`users` AS b
ON
b.`user_id` = a.`user_id`
WHERE
a.`date` = "26.12.2014"
AND
a.`value` >
(
SELECT
c.`value`
FROM
`values` AS c
WHERE
c.`user_id` = a.`user_id`
AND
c.`date` = "25.12.2014"
LIMIT 1
)
INSERT INTO tbl_name (col1,col2) VALUES ($val1_1, $val1_2), ($val2_1, $val2_2), ...,($valN_1, $valN_2);
// Сохранение данных в БД
for($a = 0, $b = count($metrika->data); $a < $b; $a++){
// ....
}
<form method="post" id="feedback-form">
private $_helper;
private function _getHelper()
{
if( !($this->_helper instanceof Helper_User) )
{
$this->_helper = new Helper_User();
}
return $this->_helper;
}
public function getData()
{
return $this->_getHelper()->getData();
}
public function setData($data)
{
return $this->_getHelper()->setData($data);
}