close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

MySQLI Recordset Error

Thread began 12/10/2018 8:14 pm by LWat85283715 | Last modified 12/11/2018 1:16 pm by LWat85283715 | 91 views | 2 replies


MySQLI Recordset Error

I created this query using the MySQLI Recordset:

$district_results_private = new WA_MySQLi_RS("district_results_private",$sdpc_i,0);
$district_results_private->setQuery("SELECT *, t1.districtID as thedistrict, t1.statusID as statusID_final, t1.agreement_typesID as agtype from ((SELECT *, data.softwareID as code1, data.districtID as code FROM data WHERE data.softwareID = ? and data.statusID != 5 and data.agreement_typesID != 8 and ((data.agreement_typesID =11 and data.statusID= '10') or (data.agreement_typesID != 11) or (data.agreement_typesID = 11 and data.statusID = '1') or (data.agreement_typesID = '50' and data.statusID= '6'))) t1 LEFT JOIN (Select * from districts where state= ?) t9 on (t1.code = t9.districtID) LEFT JOIN (SELECT *, addendums_data.addendumID as selected_addendum from addendums_data) t2 On (t1.dataID = t2.dataID) LEFT JOIN (SELECT * from addendums) t7 on (t2.addendumID = t7.addendumID) LEFT JOIN (SELECT district_data_elements.districtID, district_data_elements.softwareID as code2, GROUP_CONCAT(element_name SEPARATOR ', ') as data_list from district_data_elements LEFT JOIN data_elements on data_elements.data_elementID = district_data_elements.data_elementID WHERE district_data_elements.softwareID = ? group by district_data_elements.districtID) t3 On (t1.code = t3.districtID) LEFT JOIN (Select * from agreement_types) t4 on (t1.agreement_typesID = t4.agreement_typesID) LEFT JOIN (Select * from status) t5 on (t1.statusID = t5.statusID) LEFT JOIN (SELECT * from software) t6 on (t1.code1 = t6.softwareID) LEFT JOIN (Select * from software_contact) t8 on (t6.softwareID = t8.softwareID)) Where t9.state = ? GROUP by t1.dataID ORDER BY t9.district_name ASC");
$district_results_private->bindParam("i", "".$_GET['softwareID'] ."", "-1"); //colname
$district_results_private->bindParam("s", "".$_GET['state'] ."", "-1"); //colname2

When I try to test it, it alway says it can't find colname in the recordset. I plugged the same query into PHPMyadmin and it returns the recordset results correctly. Any ideas where I am going wrong?

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





Ease of use


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