Changeset 90067 in spip-zone


Ignore:
Timestamp:
Jun 9, 2015, 8:26:37 PM (5 years ago)
Author:
kent1@…
Message:

Perf en utilisant allfetsel +foreach plutôt que select +while +fetch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/tickets/trunk/tickets_pipelines.php

    r90066 r90067  
    279279                 * GROUP BY id_auteur
    280280                 */
    281                 $id_forums = sql_select('*','spip_forum','objet='.sql_quote('ticket').' AND id_objet='.intval($id_ticket).' AND id_forum != '.intval($flux['args']['options']['forum']['id_forum']),array('id_auteur'));
    282                 while($forum = sql_fetch($id_forums)){
     281                $id_forums = sql_allfetsel('id_auteur','spip_forum','objet='.sql_quote('ticket').' AND id_objet='.intval($id_ticket).' AND id_forum != '.intval($flux['args']['options']['forum']['id_forum']),array('id_auteur'));
     282                foreach($id_forums as $forum){
    283283                        $email = sql_getfetsel('email','spip_auteurs','id_auteur='.intval($forum['id_auteur']));
    284284                        $flux['data'][] = $email;
Note: See TracChangeset for help on using the changeset viewer.