Timeline for Convert PHP code to Jooma PHP syntax?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 3, 2018 at 20:44 | comment | added | user101289 | @mickmackusa - that's true. The follow up should have been a separate question / answer | |
Aug 3, 2018 at 20:39 | comment | added | mickmackusa |
For the record, $db->quote() on the imploded string will not single-quote-wrap the individual values inside of IN 's parenthetical list.
|
|
Aug 3, 2018 at 17:53 | comment | added | user101289 |
it's hard to read in a comment but I'd recommend imploding before the query, just to keep it clean. Then you can use the normal $db->quote method on the result
|
|
Aug 2, 2018 at 11:01 | comment | added | MailBlade |
I was wondering if you could please help me with one more piece of code: I would like to implode results, and I will post the code here: $query->select($db->quoteName(array('FieldValue'))); $query->from($db->quoteName('#__rsform_submission_values')); $query->where($db->quoteName('FieldName') . ' IN ("Container1","Container2","Container3","Container4")'); $query->where($db->quoteName('SubmissionID') . IN . (''.implode("', '", $result).'')); $db->setQuery($query);
|
|
Aug 2, 2018 at 6:03 | vote | accept | MailBlade | ||
Aug 2, 2018 at 6:02 | comment | added | MailBlade | Thank you so much @user101289!! This is absolutely perfect and does the job as required! I was struggling to figure out how I would chain the query, but now I can clearly see how it's done. I wasn't sure if you could add more than one "where" query, and I also didn't know how to implement it. I really appreciate the terrific help :) | |
Aug 2, 2018 at 5:07 | history | answered | user101289 | CC BY-SA 4.0 |