Đang Thực Hiện

161079 mySQL query needed

I need a better mySQL query for my [url removed, login to view] file on my website.

Here is the current one:

$q = mysql_query("SELECT * FROM files WHERE ([url removed, login to view] LIKE '%".$term."%' OR [url removed, login to view] LIKE '%".$term."%' OR [url removed, login to view] LIKE '%".$term."%') AND [url removed, login to view] = 1");

The problem with this is that if the search term is "blue jeans" then it will only select items from the database that have "blue jeans" together as one term in either the title,description or tags fields.

Also if the term "jeans blue" rather than "blue jeans" is in either one of these fields it will not select the item.

So, I need a query that will select the item if the word "blue" is in one field and "jeans" is in another. And also if the term "blue jeans" is used but it is "jeans blue" in the field. Or an item with "blue apparrel clothes jeans" would also come up with a search of "blue jeans."

A one word search such as "jeans" should also result in any item with that word in any of these three fields.

Also it would be great if the words "or" and "and" were stripped from the search if they were used.

If you can do it I would send you the whole [url removed, login to view] file to fix up and any other files you needed.

Kỹ năng: Bất kì công việc gì, MySQL

Xem thêm: n query, fix clothes website, any clothes, send query, select item from, mysql query, fix mysql query, together mysql, fix query, clothes description, query query, mysql query php, tags mysql php, blue jeans, blue select, fix website title, search query, stripped, database clothes, send files mysql database, mysql problem, mysql field, mysql jeans, needed php file, select select mysql

Về Bên Thuê:
( 2 nhận xét ) Sydney,

Mã Dự Án: #1907268

Đã trao cho:

metodi25sl

Quick, clean and professional code - guaranteed! Thanks, Metodi

$15 USD trong 1 ngày
(92 Đánh Giá)
6.2