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