Using mysql_get in reports
12 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: April 3, 2013 (RSS)
By Djulia - April 3, 2013 - edited: April 3, 2013
Hi Dave,
I added the querie in the script.
That functions perfectly! :)
// get query result
$sql = getEvalOutput($report['mysql']);
mysql_query("SET lc_time_names = 'es_ES'");
$result = @mysql_query($sql);
$result_error = mysql_error();
>What about putting that first line in a plugin that runs on every CMS page load.
The idea is interesting, but won't that multiply the queries unnecessarily sometimes ?
I think of the server resources...
Thanks again!
Djulia
By Dave - April 3, 2013
Hi Djulia,
Glad to hear you've got it working!
>The idea is interesting, but won't that multiply the queries unnecessarily sometimes? I think of the server resources...
It should be almost no resources since the database connection is already opened by CMSB, just sending the text across, and no databases are being queried. So if you need to do that on a wider scale in future that's a possibility.
Or alternatively you might be able to put it in a mysql config file if you have access to them: http://dev.mysql.com/doc/refman/5.5/en/option-files.html
Cheers!
interactivetools.com