Keyword

Extract tag id in tag view list

More
10 years 4 months ago #128171 by Lefteris
Replied by Lefteris on topic Re: Extract tag id in tag view list
<?php
$db = JFactory::getDBO();
$tag = JRequest::getString('tag');
$sql = "SELECT id, name FROM #__k2_tags WHERE name=".$db->Quote($tag);
$db->setQuery($sql, 0, 1);
$row = $db->loadObject();
?>

Now the $row is an object variable with two properties, the id and the name.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum