Hello,

I prepare an extension for category (for myself). I need to find page in a
sql select with "order by rand()"  (mysql).

How to do ? I have each time an error when  i try.
This is my syntax i have :

$res = $dbr->select(
        array( 'page', 'categorylinks' ),
        array( 'page_title' ),
        array(
                'cl_to' =>  'aricles de toto' ,
        ),
'',
array(
     'ORDER BY' => 'page_title ASC'
              #'ORDER BY' => rand(),
              'LIMIT' => 10,
       ),
        array( 'categorylinks' => array( 'LEFT JOIN', array(
                'cl_from = page_id' ) ) )
   );

Thank's a lot
yonnel
-- 
adresse mail :   [email protected]
mobile :           07 61 72 79 12

Identifiant de société : Siren : 501 161 384
 Code NAF : 722C
 Siret : 501 161 384 00018
 Code Insee : C75017862440
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to