I am trying to get data from mysql as follows:
$data->render_table(“st_user”,“us_id”,“us_name”);
and getting error:
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'MySQL operation failed
Unknown column '' in 'where clause'' in D:\\a\\doc\\codebase\\db_common.php:1093
Stack trace:
#0 D:\\a\\doc\\codebase\\db_common.php(1093): MySQLDBDataWrapper::query()
#1 D:\\a\\doc\\codebase\\db_common.php(744): MySQLDBDataWrapper->query('SELECT `us_id`,...')
#2 D:\\a\\doc\\codebase\\base_connector.php(533): MySQLDBDataWrapper->select(Object(DataRequestConfig))
#3 D:\\a\\doc\\codebase\\base_connector.php(514): TreeDataConnector->get_resource()
#4 D:\\a\\doc\\codebase\\base_connector.php(411): TreeDataConnector->render()
#5 D:\\a\\doc\\connector.php(12): TreeDataConnector->render_table('st_user', 'us_id', 'us_name')
#6 {main}
thrown in <b>D:\\a\\doc\\codebase\\db_common.php</b> on line <b>1093</b><br />
Also i tried to use this:
$data->render_table(“st_user”,“us_id”,“us_name”, “”, “”);
But result the same. Not sure why but db_common.php in the function “build_where” $relation gets 0 instaed of “false” or “”. This is because later “MySQLDBDataWrapper->query” generates incorrect query:
SELECT us_id
,us_name
FROM st_user WHERE ( = '0' OR
IS NULL )
As i understand the query should be:
SELECT us_id
,us_name
FROM st_user
Is it related to php version (i am using 5.0.3)