| Index
» Projekty
» phpMyEdit
» Fórum
» Export Question |
 |
billguy
Založený: 26.02.2008
Príspevky: 4
Zaslal: 2008-02-26 18:33
Návrat hore
Odpovedať s citátom
|
I'm using the export plugin for PME.
How can I force the export to contain the same values that show up in the list?
I have a virtual column like so:
| Kód: |
$opts['fdd']['virtual_07'] = array(
'name' => 'Web Site Name/Size',
'select' => 'V',
'maxlen' => 1,
'nowrap' => true,
'sort' => false,
'sql' => 'cust_id',
'php' => 'tools/file.php',
'display' => 'V'
);
|
Then tools/file.php looks like:
| Kód: |
$sql = mysql_query("SELECT dir_size, dom_name from web, domains where web.org_id =$value AND domains.dom_id = web.domain_id");
$domain = "";
$size ="";
while ($row = mysql_fetch_assoc($sql)) {
$domain .= $row['dom_name'] . " is " . $row['dir_size'] . "<BR>";
}
if ($domain){
$domains = $domain;
}
return $domains
|
This works as expected in the list, but when exported produces "cust_id" instead of the output generated by the php file.
How can I force the export to contain the same values that show up in the list?
|
billguy
Založený: 26.02.2008
Príspevky: 4
Zaslal: 2008-02-28 21:54
Návrat hore
Odpovedať s citátom
|
I worked around this issue by denormalizing my table.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|