Getting the where clause
I was wondering if it's possible to get the WHERE clause that makes up the statement from the query? Would like to be able to get what the WHERE clause that was used in the execution of the query.
Try this call but no results: $query->getQuery('criteriaonly');
calling $query->getQuery(); - Returns the entire SQL Query that is to get executed.
any possible way of accomplishing what is required?
Sorry $query->getQuery('criteriaonly'); seems buggy. Have to fix but can't give any ETA.
I need that too. It can be very useful, this way we can reuse a criteria for different tasks such as deleting,selecting or updating. Can't you just speed this one up? I think fixing it would be very simple! I am building a framework on top of pixie and without this feature I can't continue.
I use something like this:
$statements = $query->getStatements();
$wheres = $statements['wheres'];
This gives me an array of the where conditions of the query.