the plugin is intended to manage custom created tables, i.e. to have all the filelds and all the data, and filter the last by end user. It is not easy to modify the field list nor the where clause, anyway it can be done inserting shortcode options and code in the private function fjqg_javascript( $options )
Thread Starter
andr2
(@andr2)
Thank you.
What should I also do to make ‘sqfields’ parameter become visible/accessable in the class ‘FjqGridShortCodes’ (and I sssume also in FjqGridDB to access in public function get_rows())?
there is not a ‘sqfields’ parameter. The fields are grabbed from db and a jscript is generated with this field list. You can have a look at html page generated to understand how the plugin works. Probably a simple solution is to access a VIEW on mysql having the fields you want
Thread Starter
andr2
(@andr2)
Yes, sure.
As I mentioned in the 1st post the goal is to add some extra paramaters with the names like ‘sqfields’ (the list of fields instead of all fields with ‘*’) and ‘sqwhere’ with WHERE clause of SQL.
I.e. I want to have something like:
$select_sql = “SELECT $sqfields FROM {$this->tablename} WHERE $sqwhere”;
instead of
$select_sql = “SELECT * FROM {$this->tablename}“;
in function get_rows() of FjqGridDB class in wpf-jqgrid-db.php
P.S. I also see the phrase $select_sql = “SELECT ” . implode( ‘,’, $fields ) . ” FROM {$this->tablename}” in this function get_rows() but I can’t understand how to pass the list of fields to it, i.e. to add data to $fields variable. Please, advise.