New answers tagged

0

I modified my answer from How to SET a user-defined MySQL variable and increment it to produce ranking values with JDatabaseQuery? and added some additional subqueries to obtain the best scores for each athlete. I strongly recommend using "gapped ranking" because it more accurately represents athlete performance -- especially in cases of ties. ...


0

Your query written using query builder: $db = JFactory::getDbo(); $query = $db->getQuery(true)->select( [ 'RANK() OVER (ORDER BY MAX(' . $db->quoteName('fs_score') . ') DESC) AS ' . $db->quoteName('nr'), $db->quoteName('nome_e_cognome', 'Player Name'), 'MAX(' . $db->quoteName('fs_score') . ') AS ' . $...


1

This only works if the article you are attempting to get the menu item id for exists in a menu. i.e. if your menu only has a link to the category, but not the article, you will find your $Itemid = $menuItem->id; will throw a Trying to get property of non-object because $menuItem is not an object, rather an empty array. $articleId = 10; $link = 'index.php?...


Top 50 recent answers are included