Re: [jgen] Am I missing something here?

36 views
Skip to first unread message

Jevis Bwalya

unread,
Feb 1, 2024, 5:07:25 PMFeb 1
to joomla-de...@googlegroups.com
What error or output are you getting??

On Thu, 1 Feb 2024, 19:10 Lena, <papa...@gmail.com> wrote:
foreach ($deals as &$deal)
{

echo $deal->image_id;
echo "ID";

$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->qn(array('id', 'file_name', 'user_id')))
->from($db->qn('#__cmlivedeal_images'))
->where($db->qn('id') . ' = ' . $db->q((int) $deal->image_id));
$imageIds = $db->setQuery($query)->loadObject();

var_dump($imageIds);

//$images = $imageModel->getImages($deal->image_id);

//var_dump($images);
echo "aaa<br/>";



if (!empty($images))
{
foreach ($images as $image)
{
if ($image->id == $deal->image_id)
{
$deal->thumbnail = $image->file_name;
}
}
}


}

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/17d51964-ce22-4b55-8690-570e5aae920en%40googlegroups.com.

Lena

unread,
Feb 2, 2024, 3:03:27 AMFeb 2
to Joomla! General Development
Figured it out, thanks!
Reply all
Reply to author
Forward
0 new messages