close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi repeating region does only return values, if there are at least 10 values to return, otherwise it returns nothing.

Thread began 9/03/2019 1:45 pm by Roxana | Last modified 9/05/2019 11:13 am by Ray Borduin | 424 views | 4 replies |

Roxana

MySQLi repeating region does only return values, if there are at least 10 values to return, otherwise it returns nothing.

On the detail page, rspricetable will return rows, but only if at least 10 rows can be returned (depending on the product_id). For less rows it returns nothing.

rsextraimages returns nothing (this may be the same problem). I suspect something is wrong with the recordset.

I have tried deleting the repeating behaviors and adding them again, but it made no difference. I also tried setting to the behavior to an arbitrary number for rows to be returned without any change.

This is the online link for a product that returns all rows (first picture): http://neu.segufix.com/detail.php?recordID=13

This product only has one row, but nothing is returned (second picture): http://neu.segufix.com/detail.php?recordID=1

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the content is coming from rspricetable. I'd start by debugging that query and see why it doesn't return results. It is unlikely that it has anything to do with the number of results.

I see you have several INNER JOIN statements, so it could be missing rows in other tables causing the issue.

I'd add this to the page above the table:
<?php echo($rspricetable->debugSQL()); ?>

Then run that in phpMyAdmin to see if there are rows returned. It might be a missing row in the tblsize table or tblprice or tblversion.... Try changing them all to LEFT OUTER JOIN and then you will get results even when the joined table is empty. Most likely the issue is invalid data in one of the joined id columns.

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

I am not sure what running that in phpMyAdmin means, but I changed to LEFT OUTER JOIN. When I test the SQL for the record ID 1 in Dreamweaver, it returns a row. It didn't before. But when I test the page, it will still not return the row.

Sign in to reply to this post

Ray BorduinWebAssist

Maybe your live database has different data?

If you go to phpMyAdmin and run the query:

SELECT DISTINCT tblproduct.product_id, tblsize.size_id, tblsize.size, tblversion.version_id, tblversion.version, tblprice.price_id, tblprice.price, tblprice.price_can, tblprice.item_no_long, tblprice.pzn_no, tblprice.sorting FROM tblproduct LEFT OUTER JOIN tblprice ON tblprice.product_id = tblproduct.product_id LEFT OUTER JOIN tblsize ON tblprice.size_id = tblsize.size_id LEFT OUTER JOIN tblversion ON tblprice.version_id = tblversion.version_id WHERE tblproduct.product_id = 1 ORDER BY tblprice.sorting

Do you get a result?

I don't see the debugSQL value on the live site... are you sure you uploaded it?

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

I works now. After running the query in PHP MyAdmin. Both online and local. The problem was indeed, that some products have no size and/or no version. And those happened to be the products with a low number of returned rows.

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...