homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Changing query result random

 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);



 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved