ARI Smart Content: ARI SQLTable plugin

Joomla SQL query plugin, module, extension, component. Renders SQL query in Joomla article.

Renders table by data from SQL query. Allows to write SQL query in plugin parameters and create table with customizable columns containing data from database. This plugin is also a part of ARI Smart Content: DataTable Pack

Features:
  • Needs SQL knowledge to create query
  • Supports SQL queries of any complexity
  • Customizable columns
  • Could be wrapped by other table plugins, for example AriJFlexGrid or AriJTableSorter to adjust table look and functionality.

Example:


IDTitle
1Main Menu
2Login
3Popular
4Recent added Articles
5Menu Stats
6Unread Messages
7Online Users
8Toolbar
9Quick Icons
10Logged in Users
11Footer
12Admin Menu
13Admin SubMenu
14User Status
15Title
19ARI Smart content
18ARI Process Content
20Top Menu
21JoomlaStats Activation Module
24Plugins repositoty


This will create table containing user information. Arisqltablequery should contain SQL query. Arisqltablecolumns is not mandatory tag and is used for columns customization. Arisqltablecolumns tag contains arisqltablecolumn tags.

IDTitle
1Main Menu
2Login
3Popular
4Recent added Articles
5Menu Stats
6Unread Messages
7Online Users
8Toolbar
9Quick Icons
10Logged in Users
11Footer
12Admin Menu
13Admin SubMenu
14User Status
15Title
19ARI Smart content
18ARI Process Content
20Top Menu
21JoomlaStats Activation Module
24Plugins repositoty


ARISQLTable wrapped with AriJTableSorter.

Usage:

{arisqltable} {arisqltablecolumns} {arisqltablecolumn id="ID" alias="ID" width="20%" className="idg"} {arisqltablecolumn id="NAME" alias="UserName" headerClassName="head"} {arisqltablecolumn alias="Virtual Column" headerClassName="head" virtual="true" pos="1"} {coltemplate}{$NAME} - {$ID}{/coltemplate} {/arisqltablecolumn} {/arisqltablecolumns} {arisqltablequery} SELECT id AS ID,name AS NAME FROM #__users {/arisqltablequery} {/arisqltable}

or

{arisqltable} {ariconnectionstring dbHost="localhost" dbUser="user" dbPass="pass" dbName="joomla" dbType="mysqli"} {arisqltablecolumns} {arisqltablecolumn id="ID" alias="ID" width="20%" className="idg"} {arisqltablecolumn id="NAME" alias="UserName" headerClassName="head"} {/arisqltablecolumns} {arisqltablequery} SELECT id AS ID,name AS NAME FROM jos_users {/arisqltablequery} {/arisqltable}


Parameters:

  • arisqltable parameters:
    • header - Display header or not. Values: true, false
    • footer – display footer or not. Values: true, false
    • cellPadding – cell padding. Values: number
    • cellSpacing – cell spacing. Values: number
    • width – table width. Values: px or percentage
    • className – CSS class name to be applied to the table
    • inputEncoding - Indicate input encoding. Values: input encoding
    • advancedStyling - If this parameter is enabled, HTML table will contain additional CSS classes for each column and row. Values: true, false
  • arisqltablequery parameters:
    • saveTags - Save HTML tags
  • arisqltablecolumn parameters:
    • id – column name in SQL table
    • className – CSS class name to be applied to content cells (td)
    • headerClassName – CSS class name to be applied to header (th)
    • width – width. Values: px, percentage
    • alias – columns name to be displayed on UI. Values: string
    • headCellTag - HTML tag. Values: th,td
    • cellTag - HTML tag. Values: th,td
    • virtual - Indicate that this column is virtual. Values: true, false
    • hidden - Indicate that this column will be hidden. Values: true, false
    • pos - Column order. Values: integer
  • arisqltablecolumnspan parameters:
    • row - Row index(es). Values: zero-based row index (for header and footer use -1)
    • startIndex - Start column index. Values: zero-based column index
    • endIndex - End column index. Values: zero-based column index
  • ariconnectionstring parameters:
    • dbHost - database host (default localhost)
    • dbName - database name
    • dbUser - database user (default root)
    • dbPass - database pass
    • dbType - database provider. The following values are allowed: fbsql, gladius, maxdb, msql, mssql, mssqlpro, mysql, mysqli, mysqlt, odbc, postgres, postgres64, postgres7, postgres8, sqlite, sqlitepro, sybase, sybase_ace. (Attention: plugin will work correctly only if php extensions for selected provider are installed)