Skip to content

Commit

Permalink
Format trackdate to SQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
twister65 committed Aug 24, 2019
1 parent d5d3b6a commit 06d45be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/com_banners/models/banner.php
Expand Up @@ -78,7 +78,8 @@ public function click()

if ($trackClicks > 0)
{
$trackDate = JFactory::getDate()->format('Y-m-d H:00:00');
$formatDate = JFactory::getDate()->format('Y-m-d H:00:00');
$trackDate = JFactory::getDate($formatDate)->toSql();

$query->clear()
->select($db->quoteName('count'))
Expand Down
4 changes: 3 additions & 1 deletion components/com_banners/models/banners.php
Expand Up @@ -222,7 +222,9 @@ public function getItems()
*/
public function impress()
{
$trackDate = JFactory::getDate()->format('Y-m-d H:00:00');
$formatDate = JFactory::getDate()->format('Y-m-d H:00:00');
$trackDate = JFactory::getDate($formatDate)->toSql();

$items = $this->getItems();
$db = $this->getDbo();
$query = $db->getQuery(true);
Expand Down

0 comments on commit 06d45be

Please sign in to comment.