Fermé

MYSQL - Replace Multiple Values In Select Statement

I have a script to search my MYSQL database, it uses a lot of REPLACE functions to eliminate the commas, apostrophes and periods when it searches the MYSQL database. The problem is that because it uses so many REPLACE functions I believe it's using up too much of MYSQLs resources and slowing down the server. So I'm looking for an alternative method to do this or some kind of way of breaking down this function to use less resources. Here's what the code looks like:

SELECT * FROM database WHERE

( table LIKE '$search_query_all%'

OR REPLACE(table, ',' ,'') LIKE '$search_query_all %'

OR REPLACE(table, ',' ,'') LIKE '% $search_query_all'

OR REPLACE(table, ',' ,'') LIKE '% $search_query_all %'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all.%'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all,%'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all!%'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all?%'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all:%'

OR REPLACE(table, ',' ,'') LIKE '%$search_query_all;%'

OR REPLACE(table, '.' ,'') LIKE '$search_query_all %'

OR REPLACE(table, '.' ,'') LIKE '% $search_query_all'

OR REPLACE(table, '.' ,'') LIKE '% $search_query_all %'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all.%'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all,%'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all!%'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all?%'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all:%'

OR REPLACE(table, '.' ,'') LIKE '%$search_query_all;%'

OR REPLACE(table, ''' ,'') LIKE '$search_query_all %'

OR REPLACE(table, ''' ,'') LIKE '% $search_query_all'

OR REPLACE(table, ''' ,'') LIKE '% $search_query_all %'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all.%'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all,%'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all!%'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all?%'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all:%'

OR REPLACE(table, ''' ,'') LIKE '%$search_query_all;%'

)

Tell me how you plan to make your method work when you bid, do not bid without leaving a comment letting me know you fully understand the task and how to complete it.

Compétences : MySQL, PHP, Script Install, SQL

Voir plus : mysql replace multiple values, mysql select replace multiple, mysql multiple replace, mysql select replace multiple values, mysql replace multiple, mysql replace, multiple select replace mysql, mysql replace values, replace values mysql, function replace multiple values select mysql, multiple replace mysql, work values, what is the problem statement, what is problem statement, what is a problem statement, up work alternative, statement problem, statement of a problem, problem statement, php code search mysql database, it problem statement, how to make a statement of the problem, how to make a problem statement, a problem statement, mysql select replace

Concernant l'employeur :
( 201 commentaires ) N/A, United States

N° du projet : #1047106

14 freelance ont fait une offre moyenne de 56 $ pour ce travail

jqMike

Please see PM.

60 $ USD en 0 jours
(58 Commentaires)
6.7
bsoist

Please see PMB .

50 $ USD en 1 jour
(34 Commentaires)
6.4
AStonetech

I could do this quickly, lets start right now.

52 $ USD en 1 jour
(115 Commentaires)
6.4
developershut

Hi, please check PM for details

50 $ USD en 1 jour
(54 Commentaires)
6.0
emicsoft211

Hello, Please check [url removed, login to view] you

70 $ USD en 3 jours
(15 Commentaires)
5.2
hexnorify

Hi Please check my reviews if you're interested. Regards

50 $ USD en 1 jour
(6 Commentaires)
4.4
Naaraxi

See PM for details.

30 $ USD en 1 jour
(12 Commentaires)
4.1
cicika

Hello! Please check private msgs. Thanks!

60 $ USD en 2 jours
(4 Commentaires)
3.9
amsak

pls see pm

50 $ USD en 7 jours
(7 Commentaires)
3.6
Navig8

Please see PMB

150 $ USD en 1 jour
(5 Commentaires)
2.8
valdaszigas

Hi. Please check PMB.

30 $ USD en 1 jour
(1 Commentaire)
2.8
Frankie4Fingers

I'm ready to start right now.

30 $ USD en 1 jour
(0 Commentaires)
0.0
smbakhtiar

I am ready.

100 $ USD en 1 jour
(0 Commentaires)
0.0
neocanable

Hi,this definitely is not big deal. I can take up your project. And ,i have portfolio that i can show you. please contact me.

30 $ USD en 1 jour
(0 Commentaires)
0.0
Solithus

i can do it now..

30 $ USD en 0 jours
(0 Commentaires)
0.0