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

Fatal error: Cannot use object of type WA_MySQLi_RS as array

Thread began 2/17/2017 7:14 pm by Janet | Last modified 2/18/2017 5:16 pm by Ray Borduin | 66 views | 2 replies |

Janet

Fatal error: Cannot use object of type WA_MySQLi_RS as array

Hoping I can get a quick answer before the weekend begins? Fingers crossed! LOL

I have the following three queries, each to the same database. The end result I want is to have this list of companies shown as follows...

STATE

CITY

company details
company details
company details

CITY

company details
company details

etc.. through about 7 different states

her are my three queries that I thought I could then nest together, but I get the error in the topic

<?php
$state = new WA_MySQLi_RS("state",$segfaSIG3,1);
$state->setQuery("SELECT * FROM DIRECTORY ORDER BY STATE ASC");
$state->execute();
?>
<?php
$Recordset1 = new WA_MySQLi_RS("Recordset1",$segfaSIG3,0);
$Recordset1->setQuery("SELECT * FROM DIRECTORY WHERE STATE = ? ORDER BY CITY ASC");
$Recordset1->bindParam("s", "".isset($state['CITY'])?$state['CITY']:"" ."", "-1"); //colname
$Recordset1->execute();
?>
<?php
$inside_stuff = new WA_MySQLi_RS("inside_stuff",$segfaSIG3,1);
$inside_stuff->setQuery("SELECT * FROM DIRECTORY WHERE CITY = ?");
$inside_stuff->bindParam("s", "".isset($Recordset1['CITY'])?$Recordset1['CITY']:"" ."", "-1"); //colname
$inside_stuff->execute();?>

Sign in to reply to this post

Ray BorduinWebAssist

It should be:

$inside_stuff->bindParam("s", "".$Recordset1->getColumnVal('CITY') ."", "-1"); //colname

Sign in to reply to this post

Janet

Thank you Mr Borduin! I really appreciate it!

Worked like a charm!

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