Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:54:53+00:00 2026-06-07T02:54:53+00:00

databases loaded of course. The get term is an autocomplete tring, which can be

  • 0

databases loaded of course. The get term is an autocomplete tring, which can be found in the database under groupname, but as you see, if it is not a match, i don’t want to run the first part of if, if found, yes. The problem is, if I replace the get term part for the actual string, it works, and if i add a string that is not present in the database, it still works like charm. But when get term is done, it doesnt matter if the string can be found or not, numrows will be larger than 0 anyway. Why? = and LIKE tried as well ofc

$query = "select * from `gamegroups` where `groupname` = '%{$_GET['term']}%'";

$resultset = mysql_query($query);

if (mysql_num_rows($resultset) > 0 ){

$lolz = array();

while( $row = mysql_fetch_assoc($resultset) ) {
    $lolz[] = $row['gameid'];
}
echo json_encode($lolz);
            }else{print "no match debug";}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:54:55+00:00Added an answer on June 7, 2026 at 2:54 am
    $query =  "select * from gamegroups where groupname LIKE '%" . mysql_real_escape_string($_GET['term']) . "%' LIMIT 1";
    

    Because of the wildcard, I assume you want a like result?

    What you really want is to make a relevance score, and return results ordered by relevance, but that is outside the scope of this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a DIV I place some text/html code which get loaded from a database.
I have loaded my database with one table under Data Connections in the Server
I've got a richtextbox, that I plan on saving to a database, which can
Background: sqlite is great for doing SQL operations on data loaded into databases, but
I have the following scenario: Entities are loaded from the database. One of them
We have a new filestream database that will be initially loaded with 65GB data,
I have an adjacency list of objects (rows loaded from SQL database with the
Failed to load database information. Details: The database DLL crdb_ado.dll could not be loaded.
I have two databases named: DB_A and DB_B . Each database has one collection
I'm writing an application which requires a status bar update for while a database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.