Find Jobs
Hire Freelancers

Repair php script for Find and Replace text inside tabe of MySQL database

€8-10 EUR

Kansellert
Lagt ut nesten 6 år siden

€8-10 EUR

Betalt ved levering
I made a php script to find and replace text inside specific table but its not working. <?php //set up variables and enter your credentials here $dbname = "name"; $dbhost = "localhost"; $dbpass = "pass"; $dbuser = "name"; $tbl_name = "oc_attribute_description"; //set up your master array! Array goes in this or $mstr_array = array( "Packs", "Packets", "Manual", "Manual Book"); //connect to database $con = mysql_connect($dbhost, $dbuser, $dbpass) or die('no connection:' . mysql_error()); $db = mysql_select_db($dbname) or die ('cant select db: ' . mysql_error()); // reteive each column $sql = "SHOW COLUMNS FROM `{$tbl_name}`"; $res = mysql_query($sql) or die ('could not get columns: ' . mysql_error()); $find = 0; $replace = 1; while ($col = mysql_fetch_array($res)) { $sql = "UPDATE `{$tbl_name}` SET `{$col[0]}` = REPLACE(`{$col[0]}`, '{$mstr_array[$find]}' , '{$mstr_array[$replace]}')"; $find = $find + 2; $replace = $replace + 2; } ?>
Prosjekt-ID: 17266409

Om prosjektet

24 forslag
Eksternt prosjekt
Aktiv 6 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
24 frilansere byr i gjennomsnitt €12 EUR for denne jobben
Brukeravatar
I have four years experience as a web developer will fix your issue inbox me we can discuss more over chat.
€10 EUR om 0 dag
5,0 (150 omtaler)
6,5
6,5
Brukeravatar
Dear Sir, am expert in php and mysql ican correct it perfectly please reply wish to do this task please come in chat
€10 EUR om 1 dag
5,0 (54 omtaler)
5,1
5,1
Brukeravatar
I am expert in web development using PHP / MySQL. I can work on Find and Replace text inside tabe of MySQL database on your project.
€8 EUR om 1 dag
4,9 (74 omtaler)
5,0
5,0
Brukeravatar
Hi, I am a magento certified developer with more than 5 years of experience in php development. I can help on this. PM me if you are interested. Thanks
€13 EUR om 1 dag
4,9 (5 omtaler)
3,8
3,8
Brukeravatar
Hi! try this code: You HAVE TO USE STR_REPLACE <?php //set up variables and enter your credentials here $dbname = "name"; $dbhost = "localhost"; $dbpass = "pass"; $dbuser = "name"; $tbl_name = "oc_attribute_description"; //set up your master array! Array goes in this or $mstr_array = array( "Packs", "Packets", "Manual", "Manual Book"); //connect to database $con = mysql_connect($dbhost, $dbuser, $dbpass) or die('no connection:' . mysql_error()); $db = mysql_select_db($dbname) or die ('cant select db: ' . mysql_error()); // reteive each column $sql = "SHOW COLUMNS FROM '".$tbl_name."'"; $res = mysql_query($sql) or die ('could not get columns: ' . mysql_error()); $find = 0; $replace = 1; while ($col = mysql_fetch_array($res)) { $sql = "UPDATE '".$tbl_name."' SET '".$col[0]."' = STR_REPLACE(".$mstr_array[$find].", '".$mstr_array[$replace]."' , '".$col[0]."')"; $find = $find + 2; $replace = $replace + 2; } ?>
€14 EUR om 2 dager
5,0 (8 omtaler)
3,3
3,3
Brukeravatar
Hello, I am a php developer and can help you with correcting your script. If you are interested in my offer, don't hesitate contacting me. Thanks
€10 EUR om 2 dager
4,0 (2 omtaler)
2,7
2,7
Brukeravatar
hello sir/madam your project can be done. kind regards, Niraj Lathiya. Thank you.
€12 EUR om 1 dag
5,0 (4 omtaler)
2,2
2,2
Brukeravatar
HI, I AM A PHP PROGRAMMER AND WEB DEVELOPER. I HAVE A LOT OF EXPERIENCE IN PHP CODING AND DIFFERENT KINDS OF SCRIPTING LANGUAGES. I HAVE DEVELOPED MANY DYNAMIC WEBSITES USING PHP. I CAN DEBUG AND FIX THE SCRIPT. YOU MAY CONTACT ME NOW TO GET UPDATED SCRIPT. THANKS
€13 EUR om 10 dager
5,0 (5 omtaler)
2,2
2,2
Brukeravatar
Hi there: I have expertise in php. I can get the job done for you in no time. Can provide you with 100% working code. looking forward to work with you. we can discuss details over chat. regards
€8 EUR om 1 dag
0,0 (0 omtaler)
0,0
0,0
Brukeravatar
I have got your job posting and I am very much interested to work in your project. About Me : I am a software developer more than 9 years working experiences of Cakephp, codeigniter, Laravel, CorePhp, AngularJs, Ionic Hybrid Mobile Application development. I am worked in leading software companies which i mentioned in my resume. and worked 40+ successful projects in various technologies. Also made many web services APIs for mobile Apps. specialization in your requirements: I worked in many php frameworks including Cakephp and 25+ projects in Cakephp. also worked in AngularJs and IONIC framework in many websites and hybrid mobile applications. and usually using MySql as a backend. Current Working Position: Right now i am working as a freelancer and not fully bounded with any organisation. So i can dedicate work with you on your assignment. And let me know next availability time so we can move forward for achieve your project requirement. Also let me know if you have any doubts or queries about me. Regards, Krishan k. Sharma
€13 EUR om 10 dager
0,0 (0 omtaler)
0,0
0,0

Om klienten

GREECEs flagg
PATRAS, Greece
5,0
7
Betalingsmetode bekreftet
Medlem siden feb. 27, 2015

Klientbekreftelse

Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.