query using LIKE synntax

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

query using LIKE synntax

Post by pelegk2 »

i want to make a query that will match astring that will start with a certain number(5 for exaple)
and that must be at laset 2 letters length :
53
53455

so what do i do?
select * from tblXX where val like '%5?%'
what do i do?
thanks
peleg
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

not sure if this will work

Code: Select all

select * from tblXX where val like '5_%'
Mark
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

i will check it
Post Reply