I have videos on my site component HWDmedia share. They haven't schema.org integration and trying add markup to videos. For videoobject have 4 types and i add 3 of them (name,description and date) but have problems with thumbnails. As video from youtube loading with iframe thumbnails also loading in iframe, but it also adding to database. I try to add code from joomla documentation to get that url
<?php
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query
->select($db->quoteName(array('id', 'thumbnail')))
->from($db->quoteName('ojn5g_hwdms_media'));
$db->setQuery($query);
$row = $db->loadRow();
print_r($row);
?>
But in result i get
stdClass Object ( [id] => 28 [thumbnail] => )
ojn5g_
with#__
, which is the generic Joomla database table prefix. As for the thumbnail, have you checked in PhpMyAdmin that the value actually exists?<?php // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); $query ->select($db->quoteName(array('thumbnail'))) ->from($db->quoteName('ojn5g_hwdms_media')) ->where($db->quoteName('id') . ' LIKE '. $db->quote(46)); $db->setQuery($query); $row = $db->loadRow(); print_r($row); ?>
and get resultArray ( [0] => https://i.ytimg.com/vi/SXTOwG1XhSM/maxresdefault.jpg )
that correct but i need get this thumbnails from database and check if thumbnail of this video or no. How can i do it?