CB MySQL Field Plugin
The MySQL field type plugin adds a "MySQL Field" to the available list of CB fields. It does not actually add a new field to the database and cannot be edited by the user. It simply queries the database and displays the result of a MySQL statement. Another Community Builder field can be defined for saving the result of the query if required.
You can choose whether the query will return a single result or multiple and define up to 5 parts of the MySQL query including the SELECT, the FROM, the WHERE, the ORDER BY and the LIMIT clause. You can use {USERID} and {VIEWERID} in the MySQL statement which get substituted for the user’s ID and viewer’s ID of the currently viewed profile. You can restrict the query to only execute for the user and/or viewer as well as add a prefix, delimiter and suffix to the output. You can also choose to use CB field substitutions of the user or viewer with the field name in square brackets like [id] and [cb_fieldname].
Installation Instructions
- Install the plugin through the CB Plugin Management page
- Publish the plugin on the CB Plugin Management page
- Add a new “MySQL Field” type from the CB Field Management page
- Define a MySQL query and set the other parameters as desired
- Hits: 15945