I want to check if value is already exists in database with php. But this value can be as for example "John" or "JOHN" or "JOhn" or ... e.t.c
how to check for all conditions?
ziyaddinsadigov
Recommended Answers
Jump to PostI believe you can use LIKE...
SELECT username FROM users WHERE username LIKE 'John'
Jump to PostIf your database collation is set to case insensitive you can simply use
WHERE username = 'John'
All 8 Replies
phorce
131
Posting Whiz in Training
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Atli
182
Posting Pro
OsaMasw
13
Loving Helper
ziyaddinsadigov
Atli
182
Posting Pro
ziyaddinsadigov
Atli
182
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.