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


Query not retrieving the correct record

Thread began 11/17/2021 9:23 am by birdscreen398247 | Last modified 11/18/2021 9:17 am by Ray Borduin | 50 views | 2 replies |


Query not retrieving the correct record

In the attached file, the query at lines 67-72 is not returning the correct link.

It appears it is not getting the right ID value in this line: $rsebird->bindParam("i", "".($rsRecordView->getColumnVal("ID")) ."", "0");

What am I doing wrong?


Attached Files
Sign in to reply to this post

Ray BorduinWebAssist

Is "ID" the correct column name? What happens if you write it to the page:

<?php echo($rsRecordView->getColumnVal("ID")); ?>

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


I found the problem.

In the following query, there are two ID fields. One in the PORC_records table and one in the PORC_classes table.

$rsRecordView = new WA_MySQLi_RS("rsRecordView",$siteguide2018,1);
$rsRecordView->setQuery("SELECT * FROM PORC_records
LEFT OUTER JOIN aou_list ON PORC_records.species_number = aou_list.SPNO
LEFT OUTER JOIN PORC_classes ON PORC_records.PORC_class = PORC_classes.PORC_class
WHERE PORC_records.record_number = ?
$rsRecordView->bindParam("s", "".(isset($_GET['record_number'])?$_GET['record_number']:"") ."", "-1"); //colname

So I changed the name of the PORC_classes.ID field to IDN and that fixed the problem.

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





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