Thought i'd share this with people; I worked it out for an application I needed it for, and it's worked great.
This basically is a mod for XML Table Export which allows you to select what gets exported with a WHERE col1=val1.
In includes\xml\XML_TableExport.class.php, find
function setSortByField($sortByField) {
$this->sortByField = trim($sortByField);
}
and add below it:
function setspecificCol($specificCol) {
$this->specificCol = trim($specificCol);
}
function setspecificVal($specificVal) {
$this->specificVal = trim($specificVal);
}
function setselSpecific($selSpecific) {
$this->selSpecific = trim($selSpecific);
}
Then find:
if ($this->sortByField != '') {
$sql = 'SELECT * FROM ' . $this->table . ' ORDER BY ' . $this->sortByField . ' ' . $this->order;
}
Add below it:
if ($this->selSpecific != '') {
$sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->specificCol . '="' . $this->specificVal.'"';
}
And you're in business. Save and upload the file, and in your file set up to export a whole table, edit
$xml_tableexport1->setSortByField("fieldname");
So that everything inside the "" is removed.
Then simply add:
$xml_tableexport1->setselSpecific("true");
$xml_tableexport1->setspecificCol("columname"); // Column name to use in WHERE
$xml_tableexport1->setspecificVal($_GET['value']); // Value
Obviously you can remove the $_GET and use post or just a hard-coded variable, but you get the idea.
Hope this helps people!