This topic is locked
[SOLVED]

Capturing the generate WHERE clause

11/4/2024 10:13:50 PM
PHPRunner General questions
K
keithw authorDevClub member

Greetings,

I am trying to capture, via a SESSION variable or some other comparable method the WHERE clause used to geneate the results of a Search on a List Page. I would like to be able to pass it to an external process that would generate the same dataset as was done on the List Page.

I could use the entire SQL Querry,
Just the WHERE clause and hopefully and ORIDER BY if one exists.

Anybody know how to do this?

Regards,
Keith

Davor GeciDevClub member 11/5/2024

Hey Keith,

I think that you are looking for the "List page: Before SQL query"
Here is the event function:
function BeforeQueryList($strSQL, $strWhereClause, $strOrderBy, $pageObject)

Here is the documentation for this event:
https://xlinesoft.com/phprunner/docs/before_sql_query.htm

Hope this helps,
Davor

Sergey Kornilov admin 11/5/2024

BeforeSQLQuery event is a way to go for a simple task like this. There are other options available as well like Search API but more coding will be required.

K
keithw authorDevClub member 11/5/2024

I believe the Seach API will most likely be what I need based on what I have read.
I will be attempting this in the near future but not ready to today utilizing this method.

Thanx,
Keith