close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Simple MySQLi search no longer working despite matching records in table?

Thread began 5/18/2017 10:56 am by Nathon Jones Web Design | Last modified 5/18/2017 12:52 pm by Ray Borduin | 32 views | 0 replies |

Nathon Jones Web Design

Simple MySQLi search no longer working despite matching records in table?

So this has just stopped working, for no reason...

The form:

<form action="search-competitions.php" method="post" name="SEARCHCOMPSform" id="SEARCHCOMPSform" class="form-inline">

<div class="form-group">
<label class="sr-only" for="SEARCHcomps">Search</label>
<input type="text" class="form-control" id="SEARCHcomps" name="SEARCHcomps" required>
</div>

<button type="submit" class="btn btn-warning" id="SEARCHCOMPSbtn" name="SEARCHCOMPSbtn">Search <i class="fa fa-search" aria-hidden="true"></i></button>
</form>



The MySQLI@

<?php
$rsSEARCHCOMPS = new WA_MySQLi_RS("rsSEARCHCOMPS",$csdbmysqli,0);
$rsSEARCHCOMPS->setQuery("SELECT dreamcarCOMPID, dreamcarCOMPDATESTART, dreamcarCOMPDATEND, dreamcarCOMPTITLE, dreamcarCOMPSUMMARY, dreamcarCOMPTEXT, dreamcarCOMPIMG, dreamcarCOMPJUDGE1, dreamcarCOMPJUDGE2, dreamcarCOMPJUDGE3, dreamcarCOMPDATEJUDGED, dreamcarCOMPWINNERID, dreamcarCOMPWINNERCARID, dreamcarCOMPDELETE FROM dreamcarCOMPS WHERE dreamcarCOMPDELETE = 2 AND (dreamcarCOMPTITLE LIKE ? OR dreamcarCOMPSUMMARY LIKE ?) ORDER BY dreamcarCOMPDATEND ASC");
$rsSEARCHCOMPS->bindParam("c", "".(isset($_POST['SEARCHcomps'])?$_POST['SEARCHcomps']:"") ."", "-1"); //colname
$rsSEARCHCOMPS->bindParam("c", "".(isset($_POST['SEARCHcomps'])?$_POST['SEARCHcomps']:"") ."", "-1"); //colname1
$rsSEARCHCOMPS->execute();
?>



The dreamcarCOMPDELETE value in the record in the table is 2 and both dreamcarCOMPTITLE and dreamcarCOMPSUMMARY have values in them - "Spot the Ball" and "Using your judgement, place a marker where you think the centre of the ball should be." yet if you type a single letter from any of those phrases no matches are shown?

No idea what's going on. :(
This was working previously and I've not edited any part of it.

Hope you can help. Thank you.
NJ

EDIT: Jayzus! Found it. Wood for the trees again. :(

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