Jump to content

A query with a pattern match condition? <<ULTRA difficult Question>>


onedumbcoder

Recommended Posts

Hi guys,

 

lets say I have table with a field called code.

 

is it possible to do a query where I look at the values in code and see if a patter occurs?

 

for Example

 

code = "ABCDE"

 

and I want to see if  CDE occurs in there and if so get it, so something like this:

 

"select * from paper WHERE code has pattern CDE"

Link to comment
https://forums.phpfreaks.com/topic/106630-a-query-with-a-pattern-match-condition/
Share on other sites

Thanks for all the help so far.

 

I understand % means anything goes:  for example    %C  get everything that ends with C  C% ... that starts with C

And I guess I could even do  %C%C%?

 

Are there any one symbols used besides %? if so can you please mention them and their influence.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.