Jump to content

Faster Database search


sreeb
 Share

Recommended Posts

Just now, sreeb said:

Hi @adrian the one to generate an sql query form a pw selector

Just add this to Tracy's Console panel:

$selector = "template=basic-page, title=Contact 2";

d($pages->find($selector)->each("title"));
d($pages->getPageFinder()->find(new Selectors($selector), array('returnQuery' => true))->getQuery(), array('maxLength' => 99999));

I save it as "Selector SQL Generator".

This will return the results of the selector in the first dump and the SQL in the second.

Let me know if you have any troubles with it.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...