Not knowing what you do, its hard to give advise
$ids=array();
But if you try to unset or reinitialize global Vars from within a funktion
you
may only reinitalize the local var. This is probably your problem with
unset().
Try collecting the desired data first in an local array and merge this with
the result returned to the frontend only if your datacollection fits
your needs.
The local var should be deleteable/unsettable within/at the beginning of the
foreach
loops, as you step into dataprocessing.
Regards
Klaus
“eGw fan” egw@chipway.com schrieb:
Big thanks Klaus,
It works with the db function
$this->db->select(xxxx);
So, for an event, I can find
-
cal_user_id of every attendee in the egw_cal_user
-
for every cal_id, I can find name, address in the addressbook
Now I have just a problem with the 2) search : I can’t unset data of
previous ids, so I have at the end, all attendees of all events selected.
I tried unset($ids); and $ids =’’; but I still have all that garbage.
I use foreach on the arrays.
Do you have an idea about cleaning my ids ??
Thank you.
Leithoff, Klaus wrote:
Hi, have a look in infolog.
class.soinfolog.inc.php
function search.
first all infologs are retrieved, with a left join to join all
userdefined
fields
after that we step through the resultset and grab all extra fields for
the
infolog
entry and merge them with the original resultset.
Note, the query there uses a “native” db function
$this->db->select($this->extra_table,’*’,array(‘info_id’=>array_keys($ids)),LINE,FILE);
This should work for your query too.
Regards
Klaus
“eGw fan” egw@chipway.com schrieb:
Hi,
I use a “left join table egw_cal_user AS cu” in the main select
statement
for my get_rows.
That way, I get all the events in which the connected user was an
attendee.
On my rows selection, I try to get (for one row) all names of the other
attendees at this event (other people than the one connected).
To get the list of these people, I use query_list this way :
in my ui : $ids = parent::grab_attendees($cal_id,$userid);
in my bo :
function grab_attendees($cal_id,$userid)
{
if (!$cal_id || !$userid) return false;
$condition = '( cu.cal_id = '. $cal_id;
$condition .= ' AND cu.cal_user_id != '. $userid;
$condition .= ' )';
$ids =
$this->query_list($this->cu.cal_user_id,’’,array($condition));
return $ids;
}
But I get no other attendes. It seems that it takes the first get_rows
selection as egw_cal_user table instead of the overall table.
I tried a lot of things (ex : egw_cal_user.cal_id in my $condition, but
I
got an SQL error…) but I don’t the see the sun light in this tunnel.
How could I query_list other rows from this table, independantly from
the
main search ??
any idea welcome.
Thanks
eGw fan
View this message in context:
http://www.nabble.com/query_list-on-differents-rows-while-table-already-in-a-left-join-tp14398896s3741p14398896.html
Sent from the egroupware-developers mailing list archive at Nabble.com.
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
View this message in context:
http://www.nabble.com/query_list-on-differents-rows-while-table-already-in-a-left-join-tp14398896s3741p14420346.html
Sent from the egroupware-developers mailing list archive at Nabble.com.
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
Stylite GmbH
[ open style of IT ]
Morschheimer Strasse 15
D - 67292 Kirchheimbolanden
fon 06352 . 70629-0
fax 06352 . 70629-30
email kl@stylite.de
www.stylite.de
Geschäftsführer: Nigel John Vickers, Andre Keller
Registergericht Kaiserslautern, HRB 12087
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers