close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

mySQL View returns no recordset

Thread began 5/30/2017 9:53 am by LionsMane | Last modified 5/30/2017 3:50 pm by Ray Borduin | 1577 views | 9 replies |

LionsMane

mySQL View returns no recordset

I'm building new php pages for a new client where I've never built on their host before. They're running PHP v5.6, and if I build a typical mySQLi recordset, the recordset displays on the page just fine. However, if I build a view on the DB, and then try to create a recordset against the view, then the PHP page is blank. I can click the TEST button in the recordset builder dialog, and it returns the records as expected. They're just not showing on the actual page. There's nothing unusual about the page, I'm simply asking for one column to display from the recordset to confirm the data. I've built mySQLi recordsets from views on MANY other hosts without this issue. The view itself is nothing more than a join of two simple tables with a shared key UID. Any thoughts on what I might need to confirm with this particular host's DB that might account for this??? Any suggestions are welcome really.

Sign in to reply to this post

Ray BorduinWebAssist

It could be permissions on the view? You should be able to use var_dump() to dump the recordset formed from the view on the page and that will include any errors that might be occurring.

<?php
var_dump($RSName);
?>

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

LionsMane

vardump..

PM

Sign in to reply to this post

Ray BorduinWebAssist

Try running the query in phpMyAdmin and see if it returns results. With no errors and the columns showing, it really should work. I don't think it would be permissions if you see the column names.

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

LionsMane

phpMyAdmin

PM

Sign in to reply to this post

Ray BorduinWebAssist

That is very odd. If you give me FTP access I can debug further.

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

LionsMane

FTP

PM

Sign in to reply to this post

Ray BorduinWebAssist

I've updated your version of rsobj.php on the server. It appears to have fixed this problem. You can download it from the live site to replace your local version.

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

LionsMane

Got it

Confirmed it's working now. What did you have to do? Is there something on the server side I should have done to prevent this??

Sign in to reply to this post

Ray BorduinWebAssist

There is a bug in views where parameterized SQL statements don't work, which is what we used by default in our recordsets to prevent SQL injection. But when you don't have a parameter you are passing in, it isn't really necessary, so the latest version doesn't use a parameterized SQL statement when no parameters are set.

It is a bug we have worked around in the latest version of the rsobj.php file that I've uploaded to the server. Save that file so you can use it if you run into this problem in the future.

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

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