|
How to use php do the search in Json encode string?
I stored these two strings into mysql in deferent rows, and going to use php to do an advanced search engine, with description, language, education->level, cost ect..
row1
{"general":{"category":{"language":"English"},"description":"this is a demo"},"education":{"language":"English","level":"3","cost":"yes"}}
row2
{"general":{"category":{"language":"English"},"description":"this is a demo"},"education":{"language":"Franch","level":"3","cost":"yes"}}
If a user going to do the search for education ->language , he inputs "english" for the search, if these string stored in mysql,
.... where input="english" , will return both records,since both records have "english"
but i only want education->language = english do the return
How do I do this way?
it's possible to return the results like sql
LIKE '$inputstring' ie. input Fra for the search education->language return the content of row2
for advanced, i need to do the search input as CQL : english OR franch , english AND france ...
Last edited by dreamnet; 08-26-2006 at 02:59 AM..
|