| Changing query result random
|
john1000

msg:3479262 | 9:58 pm on Oct 16, 2007 (gmt 0) | hi , thought it would be better to start new topic for this.. The below works perfect now (look other topic)..but i wanna get rid of the random and that it shows all instead....cause now it only shows an image left and right...nothing more... How do i do that? global $database; $query= "SELECT * FROM #__ew_wops WHERE active = 1"; $database->setQuery( $query ); $rows = $database->loadObjectList(); if ($database->getErrorNum()) { echo $database->stderr(); return false; } $count = count( $rows ); $randItems = array_rand($rows, count($rows)); $row = &$rows[$randItems[0]]; $dtext = html_entity_decode($row->text); $row2 = &$rows[$randItems[1]]; $row2->id = $row2->cid; $dname= $row->name; $dname2= $row2->name; $dtext2= html_entity_decode($row2->text);
|
Habtom

msg:3479538 | 6:33 am on Oct 17, 2007 (gmt 0) | This code looks like it is a joomla code. You could have just edited the random function and edit the rest accordingly, but I don't think that is going to be perfect that way. This question can be posted at the Joomla Forum, and you might get a better response there.
|
|
|