I am wondering if there is a way to find an exact match in a field, where the contents is a urlencoded, serialized array? Im my case, I'm trying to find the value J-4 in the prod_cat_page_no field, but those values in the database are stored as urlencoded, serialized arrays and my search is returning results w/ J-4, J-40, J-41, etc. etc. Here's a copy of my query:
SELECT * FROM products WHERE 1 AND prod_cat_page_no LIKE '%J-4%'
I tried using the ASCII code for the perentage sign after the J-4 thinking that might do the trick, but no luck. Here's what one of the resulting fields data looks like:
a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22J-4%22%3Bi%3A1%3Bs%3A3%3A%22J-8%22%3B%7D
Any ideas? I realize now that I should have just stored the cat_page_no values in another table instead of this urlencode, serialized method. But it would be a major PITA to go back and recode several screens to work from that alternate logic. Does anyone know of something I can add to my query her to get the results I'm looking for?
Thanx,
Shaun