close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

mysqli loop results

Thread began 8/27/2015 5:09 pm by John | Last modified 8/28/2015 1:43 pm by Ray Borduin | 232 views | 2 replies |

John

mysqli loop results

I have used the query builder to built my query and when I copy and paste the query into phpmyadmin I get multiple rows in my result set. Yet I am unable to loop through the results when using the following code: What am I doing wrong? My echo of total rows does echo the correct value.
<?php if(isset($myCarousel->TotalRows) && $myCarousel->TotalRows > 0) {
print_r($myCarousel);
$myCarousel->moveFirst();
echo "<br />Total rows are: {$myCarousel->TotalRows}";
while(!$myCarousel->atEnd()){
echo "<br />Image Heading is: {$myCarousel->getColumnVal('image_heading')}";
$myCarousel->moveNext();
}
}?>

I only get one row, the first one.

Sign in to reply to this post

Ray BorduinWebAssist

The recordset code has an argument when creating the recordset that passes the number of rows to return. By default it has "1"... change it to "0" and it will return all rows.

Sign in to reply to this post

John

Thank you! I am very happy you guys are there!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...