Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Export Question

phpMyEdit Configuration     Export Question
Odoslať novú tému   Odpovedať na tému    
 
billguy     Založený: 26.02.2008   Príspevky: 4  
Príspevok 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  
Príspevok 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    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov