Jump to content

% Character - MySQL


'LinKin

Recommended Posts

Hello,

When I am going to search the row(s) where a column matches this symbol: %

MySQL returns me every row from the Database!

But it doesn't return me the value of the column where I search for the matches.

I'm using this code to make the searches:

local theQuery = dbPoll(dbQuery(dbHandler, "SELECT * FROM `myTable` WHERE `myColumn` LIKE ?", "%"..theArg.."%"), -1) 

Note that the variable 'theArg' is the string that I'm looking matches for. So in this case it is '%'

I've seen that % symbol has a special use in MySQL, however I don't understand what it really does.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...