MySQL little problem.
#1

I have this query:
pawn Код:
SELECT Name,Pn FROM `players` WHERE Name LIKE '%s%' AND Pn!=0
To select the name and the phone number from a part of name. The query executes but it won't give me results. What's wrong?
Reply
#2

if you use the format() function:
replace '%s%'
width '%%%s%%'

edit:
This query you use is insecure.

For example my name is Tim
Someone else is called timmy
This query will return both results.
For this purpose, don't use LIKE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)