Using a literal "%" in a format (MySQL)
#1

Hey guys, I want to withdraw all accounts which contains the following entered name, I tried using '%%%e%%' and it didn't go well.
I used a regular format and inserted it into mysql format, here is my code
PHP код:
    format(stringsizeof(string), "%%%s%%"name);
    
mysql_format(mysqlquerysizeof(query), "SELECT `Username`, `Registration`, `IP`, `Score` FROM `Users` WHERE `Username` LIKE '%e' LIMIT %d"nameamount);
    print(
query); 
How can I solve this ?

Here is the query for the `name` - "erer":
Код:
SELECT `Username`, `Registration`, `IP`, `Score` FROM `Users` WHERE `Username` LIKE 'erer' LIMIT 2
Reply


Messages In This Thread
Using a literal "%" in a format (MySQL) - by NeXoR - 03.11.2016, 19:57
Re: Using a literal "%" in a format (MySQL) - by jlalt - 03.11.2016, 20:04
Re: Using a literal "%" in a format (MySQL) - by NeXoR - 03.11.2016, 20:12
Re: Using a literal "%" in a format (MySQL) - by Konstantinos - 03.11.2016, 20:14
Re: Using a literal "%" in a format (MySQL) - by NeXoR - 03.11.2016, 20:18

Forum Jump:


Users browsing this thread: 1 Guest(s)