This topic is locked

Capture Search information in the Audit Table

3/11/2010 6:35:47 PM
PHPRunner General questions
W
wypman author

Is it possible to capture the username and what they have searched on in the audit log?

Sergey Kornilov admin 3/11/2010

Audit log is not designed for this purpose. I can recommend to use BeforeSQLQuery event for this purpose where you can save all search queries. Example:



if (@$_REQUEST["a"]=="search" || @$_REQUEST["a"]=="advsearch")

{

$sql="insert into search_log (userid, sql) values ('".$_SESSION["UserID"]."','".$strSQL."')";

CustomQuery($sql);

}