Skip to main content
6 events
when toggle format what by license comment
Feb 11, 2023 at 22:32 comment added Lodder @mickmackusa You're right...didn't even notice that. leftJoin->('INNER' is incorrect.
Feb 11, 2023 at 21:58 comment added mickmackusa @Lodder does leftJoin('INNER' make sense? Is it an INNER JOIN or a LEFT JOIN? leftJoin() only accepts a single string argument. LIKE should not be used without wildcards -- if no wildcards, just use =. If $articleId is an integer, then it should not be quoted by quoteName(). It could be cast as an int or quoted by quote().
Feb 11, 2023 at 14:47 comment added Gillian I thought I might try reassigning ``$this``` to reference a database view called #__content_with_featured that I had created, which contains all the #__content columns as well as the #__content_frontpage data, but I got a red Fatal error page instead.
Feb 11, 2023 at 14:18 comment added Gillian Commenting out $db->setQuery($query); means that I now see two PHP warnings: "foreach() argument must be of type array|object, int" and "Array to string conversion..." on the line $query->where($db->quoteName($articleId) . ' = ' . $db->quoteName('f.f_id'));. For the first warning, I added 'array' to this line: $query->select($db->quoteName(array('f.featured_up'))); but it made no difference to the warning. For the second warning, there can be 'Null' values in either or both 'featured_up' and 'featured_down' columns if no date has been entered. So how do I get around that?
Feb 10, 2023 at 18:12 comment added Gillian Thanks @Lodder. I made the corrections but I'm still getting a white page. I now have Error reporting on maximum, but it's not showing anything. In Firefox developer tools I just get a 500 error notification. The link you sent is the page I was looking at this morning, but none of the examples explain how to create a new variable.
Feb 10, 2023 at 13:06 history answered Lodder CC BY-SA 4.0