Open-AudIT
http://www.open-audit.org/phpBB3/

[bug?] Groups with Manual Select SQL
http://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6255
Page 1 of 1

Author:  el_geto [ Fri Dec 20, 2013 1:23 am ]
Post subject:  [bug?] Groups with Manual Select SQL

Is it me, or it seems that I cannot create groups with a "manually entered" Select sql? Neither 1.0.3 nor 1.1 seem to be sending my manual sql query to the database, and adding the sql query directly in the db doesn't work. If I use the assisted method, is all fine, but I have a complex query and I can't use it.

When I add any sql, this is what I get back
Code:
Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' system WHERE .system_id = system.system_id AND = '' AND system.man_status = 'p' at line 1

INSERT INTO oa_group_sys (system_id, group_id, group_sys_type) SELECT DISTINCT(system.system_id), '101', 'system' FROM , system WHERE .system_id = system.system_id AND = '' AND system.man_status = 'production' AND .timestamp = system.timestamp

Filename: C:\wamp\www\code_igniter\system\database\DB_driver.php

Line Number: 330


Did I break my OA?

Author:  el_geto [ Fri Dec 20, 2013 9:06 am ]
Post subject:  Re: [bug?] Groups with Manual Select SQL

Oh, and if I try to Edit the Group, I get this other error

Code:
Error Number: 1136

Column count doesn't match value count at row 1

INSERT INTO oa_group_sys (system_id, group_id, group_sys_type) SELECT system.system_id from system left join sys_hw_network_card on system.system_id = sys_hw_network_card.system_id where system.man_status = 'production' AND system.timestamp = sys_hw_network_card.timestamp and sys_hw_network_card.net_dns_host_name != '' and system.hostname != substring(sys_hw_network_card.net_dns_host_name, 1, length(system.hostname))

Filename: C:\wamp\www\code_igniter\system\database\DB_driver.php

Line Number: 330


Here it is clear that the Insert query is missing the Group ID and System type from my select statement, but all that is added by OA. If I try to add the Select statement directly into the DB, it looks like it breaks the update of every other group I have.

Author:  jpa [ Fri Dec 20, 2013 9:47 am ]
Post subject:  Re: [bug?] Groups with Manual Select SQL

Not just you. Editing an existing Group seems to work. Maybe activate a group you don't normally use and try to edit the SQL and info for that group.

Mark is on vacation and I don't know if I'll have time to diagnose the problem.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/