I was going to use the scuttle solution at: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html to process requests on my site. I was wondering how I can take a search from a user and turn it into a single query.
For example, let the user enter “blue dogs” in their search query ... How can I dynamically update the query to include (“blue”, “dog”) in the union and intersection queries?
You can do this:
$search_string = implode(',', $search_array);
Now in your request you can use the sentence IN:
IN
$query = "select * from table where field IN ('".$search_string."')";
, , , : , SQL-. : PHPManual
for example, your user input is blue dogs, then on the page
$searchstring = "blue dogs"; // or fetch the input $arr = explode(" ",$searchstring); //this is explode the text by every "space" character
you now have the string entered by the user in the $ arr array, now use it in the request, as usual,
Source: https://habr.com/ru/post/1745923/More articles:Problem with closed img tag - ruby-on-railshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745919/how-do-i-create-a-local-bare-repository-with-tortoisegit&usg=ALkJrhgWxGgw_NxzRy81systcCijhW1ggwtortoisegit push successful but no new files? - gitControl characters as delimiters - javascriptComplaint Management System - crmHow to create a UISplitView manually? - objective-cTime zones of different countries - javascriptСтатическое свойство, теряющее свою ценность с перерывами? - propertiesReading XML using XElement in Silverlight - silverlightWhy does changing the StrokeType of a GestureOverlayView object affect the standard behavior of the view? - androidAll Articles