Member Login

Knowledge Base - SQL Custom Field Plugin

The SQL custom field will run a SQL statement, and display the result using the HTML template entered.

The SQL command will have certain variables replaced in it (listed below), and the first row passed to the HTML template.

  • {ticketid} - Ticket ID
  • {userid} - Ticket main user id
  • {reference} - Ticket reference
  • {ticket_status_id} - Status ID
  • {ticket_pri_id} - Priority ID
  • {ticket_cat_id} - Category ID
  • {ticket_dept_id} - Department ID
  • {prod_id} - Product ID
  • {admin_id} - Handler ID
  • {email} - Unregistered user email

Once the SQL has been run, the HTML template is parsed with the fields returned. All fields are replaced when surrounded by { }.

Example SQL:

SELECT * FROM #__users WHERE id = '{userid}'

Example Display:

<i>{userid}</i>: {name}, <b>{username}</b>

Any of the fields returned or variables from the SQL parse are available in the template.

Extra display fields available:

  • {reference} - Ticket Ref
  • {title} - Title
  • {opened} - Open date
  • {closed} - Close date
  • {status} - Status name
  • {color} - Status color
  • {assigned} - Handler name
  • {useremail} - Users EMail
  • {username} - Users name
  • {handleremail} - Handlers Email
  • {handlerusername} - Handlers username
  • {department} - Department name
  • {category} - Category name
  • {product} - Product name
  • {priority} - Priority name
  • {pricolor} - Priority color
  • {groupname} - Group name
  • {custom_X} - Custom field X
  • {custom_ALIAS} - Cusotm field with alias ALIAS
Applies To

Support Portal

Vote For Us!

Please vote for our software or write a review of one of our products on the Joomla! Extensions Directory