How to re-write sql for joomla JDatabase

by Gibzy   Last Updated May 15, 2018 14:10 PM

I am new to custom Joomla coding so excuse me for this, I want to execute the following statement:

"SELECT 
    MAX(CASE WHEN v.FieldName = 'Team_Name' THEN v.FieldValue END) 'Team_Name'
    , MAX(CASE WHEN v.FieldName = 'Manager_Name' THEN v.FieldValue END) 'Manager_Name'
FROM `team_values` v  
where tournamentId=5"

but I am not sure how to write it, tried many scenarios but they didn't work out for me.



Related Questions




PHP function with JDatabase queries

Updated September 08, 2016 08:06 AM

Ordering a UNION

Updated April 21, 2015 00:04 AM

Transforming a Query for JDATABASE

Updated July 28, 2015 14:04 PM


Cache file /home/queryxchang/public_html/apps/frontend/config/../cache/-q-11-22829-how-to-re-write-sql-for-joomla-jdatabase- could not be written