Function wp_rml_create_all_children_sql
Returns a SQL query to get all children for a folder id. The first result for this SQL statement is the first children and so on... Use rmldata.lvldown field for the depth number downwards
$options parameters:
"fields" => (string) SELECT fields (default: "rmldata.*"), "join" => (string) JOIN statement (default: ""), "where" => (string) Replace WHERE statement, it is preferred to use afterWhere (default: $wpdb->prepare("rmldata._parent = %d", $folderId) . ($includeSelf === true ? "" : $wpdb->prepare(" AND rmldata.id != %d", $folderId))), "afterWhere" => (string) Additional WHERE statement to the above WHERE (default: ""), "orderby" => (string) ORDER BY statement (default: "rmldata.parent, rmldata.ord"), "limit" => (string) LIMIT statement (default: "")
Parameters summary
IFolder|integer |
$folder |
The folder object or folder id |
boolean |
$includeSelf = false |
Set true to include self (passed $folder) |
array |
$options = null |
Additional options for the SQL query, see above |