Class WPDA_Data_Tables
author | Peter Schulz |
---|---|
since | 1.0.0 |
package | WPDataAccess\Data_Tables |
get_data()
Once a jQuery DataTable is build using \WPDataAccess\Data_Tables\WPDA_Data_Tables::show(), the DataTable is filled according to the search criteria and pagination settings on the Datable. The query is performed through this function. The query result is returned (echo) in JSON format. Table and column names are checked for existence and access to prevent hacking the DataTable code and SQL injection.
since | 1.0.0 |
---|---|
see | \WPDataAccess\Data_Tables\WPDA_Data_Tables::show() |
show(integer $pub_id, string $database, string $table_name, string $column_names, string $responsive, integer $responsive_cols, string $responsive_type, string $responsive_icon, string $sql_where, string $sql_orderby) : \WPDataAccess\Data_Tables\Shortcode
Table and column names provided are checked for existency and access to prevent hacking the DataTable code and SQL injection.
since | 1.0.0 |
---|
integer
Publication ID.
string
Database name.
string
Database table name.
string
Comma seperated list of column names.
string
Yes = responsive mode, No = No responsive mode.
integer
Number of columns to be displayd in responsive mode.
string
Modal, Collaped or Expanded (only if $responsive = Yes).
string
Yes = show icon, No = do not show icon (only if $responsive = Yes).
string
SQL default where clause
string
SQL default order by
\WPDataAccess\Data_Tables\Shortcode
responseshow_header(string $columns, string $responsive, integer $responsive_cols, string $pub_format, string $hyperlinks, $add_data_attribute = false
) : \WPDataAccess\Data_Tables\HTML
string
Comma seperated list of column names.
string
Yes = responsive mode, No = No responsive mode.
integer
Number of columns to be displayd in responsive mode.
string
Formatting options.
string
Hyperlinks defined in column settings.
\WPDataAccess\Data_Tables\HTML
output$wpda_list_columns