Shop-Script и знаки вопроса при импорте базы MySQL

17.06.2009, рубрики: Мелочи | Теги: , , , | 7 022 комментария »

На днях позвонил человек, попросил помочь с кодировкой сайта. Сайт сделан на Shop-Script (интернет магазин). Ситуация такова, сайт хостился у одного хостинг-провайдера, теперь на другом. Был создан дамп базы данных MySQL и импортиран с той же кодировкой сравнения. Итог: вместо латинских букв, знаки вопроса. Игры с кодировками при экспорте базы и импорте успехов не принесли. Оставалось последнее действие, я был полон надежды, что оно поможет. И так, начнем.

В файле: /includes/database/mysql.php находим блок:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function db_query($s) //database query
{
$res = array();
$res["resource"] = mysql_query($s) or die( db_error()." SQL query : ".$s);
$select_keyword_index    = strpos(strtoupper($s), "SELECT");
$from_keyword_index        = strpos(strtoupper($s), "FROM");
$columns=substr( $s, $select_keyword_index + strlen("SELECT"),
$from_keyword_index - 1 - ( $select_keyword_index + strlen("SELECT") ) + 1 );
$res["columns"]=array();
$column_index = 0;
$columnArray = explode(",", $columns);
foreach($columnArray as $value)
{
if ($asIndex = strpos(strtoupper($value), "AS "))
$columnName=trim(substr($value, $asIndex+2));
else
$columnName=trim($value);
$res["columns"][$columnName] = $column_index;
$column_index++;
}
return $res;
}
[/sourcecode]

И приводим его к такому виду:

[sourcecode language='php']
function db_query($s) //database query
{
$res = array();
$res["resource"] = mysql_query($s) or die( db_error()." SQL query : ".$s);
mysql_query("SET character_set_client=cp1251");
mysql_query("SET character_set_connection=cp1251");
mysql_query("SET character_set_results=cp1251");
$select_keyword_index    = strpos(strtoupper($s), "SELECT");
$from_keyword_index        = strpos(strtoupper($s), "FROM");
$columns=substr( $s, $select_keyword_index + strlen("SELECT"),
$from_keyword_index - 1 - ( $select_keyword_index + strlen("SELECT") ) + 1 );
$res["columns"]=array();
$column_index = 0;
$columnArray = explode(",", $columns);
foreach($columnArray as $value)
{
if ($asIndex = strpos(strtoupper($value), "AS "))
$columnName=trim(substr($value, $asIndex+2));
else
$columnName=trim($value);
$res["columns"][$columnName] = $column_index;
$column_index++;
}
return $res;
}

Ура, получилось. Знаки вопросов пропали, буквы отображаются как нужно.


7 022 комментария на запись “Shop-Script и знаки вопроса при импорте базы MySQL”

  1. 1 Bernardtramp сказала в 10:55, 24.03.2021:

    esami del sangue della tiroide propecia finasteride e viviscal generico prezzi finasteride dosaggio di propecia confrontare i prezzi della finasteride online propecia da vbulletin intitle visualizzare il profilo tamsulosina e finasteride masteron e propecia sconto finasteride propecia msd 72 finasteride che cosa пїЅ per effetti del finasteride finasteride medicina finasteride effetti collaterali a lungo termine finasteride istopatologia

  2. 2 Bernardtramp сказала в 11:15, 24.03.2021:

    fare il proprio citrato di sildenafil sildenafil citrate 50mg paypal glina tadalafil sildenafil medicina del sesso sildenafil frode bancomat trattamento dell'overdose di sildenafil ottenere il sildenafil al banco sildenafil citrate kamagra https://www.ilquaderno.it/myQ2/robots/Sildenafil_acquista_100mg_online_Viagra.html citrato di sildenafil naturale sildenafil lolo sul sildenafil falso sildenafil discriminazione per etГ  trattamento con sildenafil nell'ipertensione polmonare fallito effetti collaterali del sildenafil mygra sildenafil

  3. 3 Bernardtramp сказала в 11:48, 24.03.2021:

    programa para localizar telefonos moviles software de espionaje de telГ©fonos mГіviles como rastrear un telefono movil rastreo de telГ©fonos iphone rastrear mi celular busque en rastrear celular por gps https://www.upo.es/economia/enonom/software_espia_como_espiar_un_movil_un_iphone_android_localizador_de_moviles.html localizar posicion de un movil rastrear mГіvil localizar movil por gps android iphone 4/4s localiza movil localizar moviles por internet cГіmo puedo localizar un iphone

  4. 4 beiplyabalse сказала в 12:35, 24.03.2021:

    credit report credit score online how to check credit score for free chase credit

  5. 5 Bernardtramp сказала в 12:37, 24.03.2021:

    testimonianze cialis tadalafil online india cheap cialis online a href tadalafil pressione sanguigna cialis voucher cialis po box cialis adderall india biblioteca script cialis cialis e sorditГ  viagra cialis salute erezione del pene uomo cialis on ine cialis regalo gratuito ingredienti cialis cibo cialis generico a buon mercato

  6. 6 Bernardtramp сказала в 13:34, 24.03.2021:

    billiges Ivermectin Ivermectin Toxizität Frettchen Anwendung von Ivermectin beim Menschen Welche Hundearten können kein Ivermectin bekommen Ivermectin Anwendungstabelle für Hunde Ivermectin und Pyrantel Ivermectin-Hundestaffel Ivermectin flüssig Ivermectin zur Vorbeugung von Ringelflechte Ivermectin-Krämpfe Ivermectin-Mischung Ivermectin durvet Ivermectin 1 Dosierung bei Katzen Huhn Ivermectin Dosierung Ivermectin Behandlung für Ohrmilben

  7. 7 JaneHycle сказала в 16:28, 24.03.2021:

    [url=https://xlcialis.com/]cialis 10 price[/url]

  8. 8 KegoKibStodeneK сказала в 17:11, 24.03.2021:

    check my credit score [url=https://creditscorecheckww.com/ ]free credit score check your credit report online [/url] credit report agencies credit report monitor free credit score check your credit report online

  9. 9 beiplyabalse сказала в 18:48, 24.03.2021:

    yearly free credit report equifax free credit score free credit report government get a free credit report [url=https://creditscorests.com/ ]credit report dispute [/url]

  10. 10 Lecfjerry сказала в 21:06, 24.03.2021:

    [url=https://hopeviagrin.com/]male viagra pill walmart[/url] [url=https://lightvigra.com/]viagra femenino[/url] [url=https://xuypharmacyonline.com/]cvc pharmacy[/url] [url=https://online21rxon.com/]pharmacy walmart[/url] [url=https://happyrxpharmacy21.com/]walgreen's pharmacy[/url] [url=https://storerxpharmcanada.com/]vons pharmacy[/url]

  11. 11 Help With My Essay сказала в 21:45, 24.03.2021:

    [url=https://jeyessay.com/]essay online education[/url]

  12. 12 Grvloums сказала в 23:08, 24.03.2021:

    [url=https://kloviagrli.com/]200mg viagra[/url] [url=https://vigedon.com/]best places to buy viagra[/url] [url=https://llecialisjaw.com/]cialis patent expiration date[/url] [url=https://jwcialislrt.com/]order cialis online[/url] [url=https://jecialisbn.com/]cialis lilly[/url]

  13. 13 spearmaoveria сказала в 23:24, 24.03.2021:

    equifax credit report free equifax credit report credit

  14. 14 beiplyabalse сказала в 23:25, 24.03.2021:

    guaranteed payday loan payday loan quick paydayloans personal loans

  15. 15 spearmaoveria сказала в 0:31, 25.03.2021:

    research paper how to write an essay buy cheap essay

  16. 16 AbgcReupt сказала в 0:50, 25.03.2021:

    [url=https://thesiswritingtob.com/]professional thesis writing service[/url] write a good thesis thesis help doctoral thesis

  17. 17 AAAAAgmailcom сказала в 1:18, 25.03.2021:

    bzzjffsdfgjnrfj

    theauctionboard.com/showthread.php?tid=804942

    www.rebels-softair.it/for...f=3&t=129690

    kelvindavies.co.uk/forum/...e2209f5f141e3468

    beta.cqpolska.pl/showthread.php?tid=34479

    naturalbodybuilding.ru/ru...0#comment-288713

    sexnzb.com/tmvdbcuz-t512784.html

    www.rebels-softair.it/for...f=3&t=129692

    www.spruance.net/viewtopi...?f=1&t=86422

    bbs.imoa.cn/forum.php?mod...70782&extra=

    naturalbodybuilding.ru/ru...0#comment-288715

    www.successdigestforum.co...=6&t=1522201

    cardingmagazine.com/showt...334120#pid334120

    uc.infinix.club/forum.php...tra=#pid17220792

    www.djangoboards.com/boards/1/topics/149017/

    webboard.travel.sanook.co...;ID_MSG=29692930

    www.successdigestforum.co...=6&t=1522202

    www.businessinf.com/ro/fo.../77336-aknmfhru/

    webboard.auto.sanook.com/...;ID_MSG=29692936

    mbrito.uosdesigndegrees.c...d.php?tid=544570

    webboard.auto.sanook.com/...;ID_MSG=29692924

    xn--l1adgmc.xn----7sbzamh...=8&t=2599475

    www.djangoboards.com/boards/1/topics/149016/

    www.successdigestforum.co...=6&t=1522203

    webboard.money.sanook.com...;ID_MSG=29692948

    balanching.wordpress.com/...72750e4a7d845e8d

    www.unraveled.net/phpbb/v...=6&t=1841281

    www.unraveled.net/phpbb/v...=6&t=1841239

    share1s.net/viewtopic.php?f=21&t=1185188

    fr.gopinball.com/forum/vi...f=6&t=256746

    ca.gopinball.com/forum/vi...f=6&t=256745

    melevistas.com/viewtopic...=4&t=1268605

    forum.1one.blue/viewtopic...=14&t=144093

    protee.guru/viewtopic.php?f=8&t=1510355

    svrsps.com/viewtopic.php?f=7&t=49378

    vilia.it/index.php/forum/...iyal-11-11#61728

    madisonsongwriterscircle...?f=5&t=52228

    lucentflame.com/chocodisc...d1119b540f95bc9a

    www.rickbouthoornracing.c...riyal-4-4#731586

    lucentflame.com/chocodisc...e4e07a1152b43905

    kamdanlife.network/forums...%80%D0%B8%D1%8F/

    gopinball.com/forum/viewt...f=6&t=256778

    www.aqueousmeditation.com...?f=4&t=58561

    melevistas.com/viewtopic...=4&t=1268241

    www.aqueousmeditation.com...?f=4&t=58562

    www.aqueousmeditation.com...?f=4&t=58566

    melevistas.com/viewtopic...=4&t=1268104

    melevistas.com/viewtopic...=4&t=1268174

    forum.moroe.eu/viewtopic.php?f=4&t=57395

    oleksy-bau.de/index.php/f...a-1-8-1-8#771365

    vilia.it/index.php/forum/...ch-3-3-3-3#61732

    www.adimpiantielettrici.i...Itemid=124#72227

    www.rickbouthoornracing.c...n-2-5-2-5#731522

    nadiawashere.com/forum/vi...f=5&t=141340

    nadiawashere.com/forum/vi...f=5&t=141332

    nadiawashere.com/forum/vi...f=5&t=141337

    forum.prasinoi.eu/viewtop...f=8&t=589524

    www.rickbouthoornracing.c... -2021-9-9#731577

    zatoxgaming.org/forums/vi...f=5&t=522847

    palais.beesims.com/phpbb/...?f=4&t=56876

    madisonsongwriterscircle...?f=5&t=52234

    madisonsongwriterscircle...?f=5&t=52227

    palais.beesims.com/phpbb/...?f=4&t=56872

    nocnekino.pl/showthread.php?tid=23651

    mywork2.ru/speak/viewtopi...f=2&t=161802

    www.adeat-onlus.org/index...Itemid=178#64039

    bitexpert.club/viewtopic.php?f=5&t=256551

    lucentflame.com/chocodisc...63e363406c896187

    forum.pokerfishka.com/mai... -5-seriya#162299

    forum.pokerfishka.com/mai... -8-seriya#162275

    bitexpert.club/viewtopic.php?f=5&t=256601

    Ваш комментарий ожидает проверки модератора.

  18. 18 SueHycle сказала в 1:22, 25.03.2021:

    [url=https://buygmeds.com/]trazodone 150 mg tablet[/url] [url=https://cialistadalafilonline.com/]cialis 20 mg discount coupon[/url] [url=https://pharmcr.com/]azithromycin brand name uk[/url] [url=https://saletadalafil.com/]can i buy cialis over the counter canada[/url] [url=https://norxstore.com/]modafinil over the counter canada[/url] [url=https://myhealthow.com/]generic prozac online[/url] [url=https://keepills.com/]flagyl 400 mg tablet[/url] [url=https://icxhealth.com/]celexa com[/url] [url=https://cialistadalafilviagra.com/]20 mg cialis for daily use[/url] [url=https://cialisviagralevitra.com/]cost cialis[/url]

  19. 19 spearmaoveria сказала в 2:11, 25.03.2021:

    free essay writer essay writing software do your homework

  20. 20 EvaHycle сказала в 4:03, 25.03.2021:

    [url=http://myhealthow.com/]120 mg prozac[/url]

  21. 21 adotaccuthfaf сказала в 4:55, 25.03.2021:

    fast payday loan online payday loans usa payday loan small loans [url=https://samedayloanow.com/ ]1000 payday loan [/url]

  22. 22 Bernardtramp сказала в 5:09, 25.03.2021:

    keylogger 4pda cell phone monitoring for parents free sms tracker for iphone how to track iphone shipment best cell phone locator phone tracker real time how to find iphone password how to track an iphone keylogger download mac sms covid 19 tracker cell phone tracker.org gsm android spy pro apk stingray 2 cell phone tracker phone tracker information how to track iphone phone

  23. 23 Bernardtramp сказала в 5:33, 25.03.2021:

    android/spyc23.a what is the best free android spy app how to track iphone user cell phone spy listening devices phone tracker 2020 sms tracker download keylogger trojan keylogger javascript street fighter 5 keylogger remote sms tracker android how to track a iphone xr phone tracker jailbreak how to cell phone tracker borderlands 3 keylogger xfinity phone tracker

  24. 24 EvaHycle сказала в 5:47, 25.03.2021:

    [url=http://viagrabrp.com/]sildenafil citrate uk[/url]

  25. 25 Bernardtramp сказала в 7:49, 25.03.2021:

    sms tracker link lg stylo 4 phone tracker perfect keylogger 94fbr keylogger python 3 how to track iphone phone number phone tracker by number phone tracker gps free online how to use a phone as a tracking device keyloggers o que sao os x keylogger track htc one x keylogger removal c keylogger tutorial what is sms tracker can you track a htc phone

  26. 26 JoeHycle сказала в 7:59, 25.03.2021:

    [url=https://cialisbbt.com/]cialis pills online india[/url] [url=https://norxstore.com/]buy provigil 100mg[/url] [url=https://cialisztab.com/]dapoxetine 100 mg[/url] [url=https://zzmeds.com/]buy clomid online uk paypal[/url] [url=https://cialisgre.com/]soft cialis online[/url] [url=https://onapharmacy.com/]med pharmacy[/url]

  27. 27 spearmaoveria сказала в 8:53, 25.03.2021:

    i need help writing a paper for college help me write my essay help with an essay essay typer [url=https://essayhelperkdu.com/ ]thesis writing help [/url]

  28. 28 Bernardtramp сказала в 9:06, 25.03.2021:

    phone location tracker zambia a free phone tracker cell phone tracker mexico t mobile cell phone tracker what is sms tracker cell phone tracking equipment how to track iphone with just phone number android spy remote keylogger xinput cell phone spying on you how to track iphone using find my iphone i cam spy android how to track iphone on family sharing i keylogger software sms tracker login

  29. 29 KimHycle сказала в 9:56, 25.03.2021:

    [url=https://buyviagratab.com/]viagra for sale in us[/url]

  30. 30 MarkHycle сказала в 10:25, 25.03.2021:

    [url=https://viagrafifty.com/]best price for viagra in uk[/url] [url=https://wwviagra.com/]canada rx pharmacy[/url] [url=https://viagrasildenafilpill.com/]legitimate canadian online pharmacies[/url]

  31. 31 adotaccuthfaf сказала в 10:48, 25.03.2021:

    free credit report online check my credit score free credit score check your credit report online free credit report equifax [url=https://fastcheckcreditscore.com/ ]free credit score check online credit report [/url]

  32. 32 Bernardtramp сказала в 11:31, 25.03.2021:

    Lymphom-Nebenwirkung von Doxycyclin doxycycline hyc macht meinen RГјcken schmerzhaft Doxycyclin und Emetrol Doxycyclin-Dermititis Doxycyclin und Nebenwirkungen kann Doxycyclin langfristig eingenommen werden Doxycyclin Stuhl https://www.rockharz-festival.com/wp-includes/pages/Doxycyclin_100mg.html Doxycyclin Geburtenkontrolle negative Auswirkungen von Doxycyclin kann Doxycyclin HalsentzГјndung behandeln Doxycyclin Hunde Lyme BlasenentzГјndung Doxycyclin Nebenwirkungen nach Tsking Doxycyclin Doxycyclin und blutiger Stuhl

  33. 33 KegoKibStodeneK сказала в 12:51, 25.03.2021:

    free credit report info [url=https://creditreportsps.com/ ]my free credit score [/url] credit score check free what is an excellent credit score credit report monitor

  34. 34 Bernardtramp сказала в 14:45, 25.03.2021:

    sconto propecia per cane reclami propecia prendere propecia con il cancro alla prostata testosterone finasteride finasteride propecia e ginecomastia propecia farmacia foglietto illustrativo propecia finasteride fda propecia mutageno tetragenico masteron e propecia finasteride 1mg scheda propecia sintomi finasteride o propecia foglietto illustrativo propecia grande gatto finasteride

  35. 35 WanceLeawsdape сказала в 15:06, 25.03.2021:

    i need help writing a paper for college [url=https://essayhelperkdu.com/ ]essay maker [/url] help with an essay how to write essay

  36. 36 Bernardtramp сказала в 15:23, 25.03.2021:

    facoltГ  a nome di levitra levitra 2003 ultimo il levitra e' meglio degli altri cialis levitra confrontare altri usi per il levitra vardenafil comprare levitra a buon mercato online indicazioni per levitra combinare levitra viagra vardenafil confezione campione levitra viagara levitra discussione levitra lavoro per le donne levitra longevitГ  levitra 1

  37. 37 JudyHycle сказала в 15:46, 25.03.2021:

    [url=http://acbrx.com/]buying ventolin in usa[/url] [url=http://buygmeds.com/]trazodone 150[/url] [url=http://saletadalafil.com/]cialis 800[/url] [url=http://cialismlt.com/]generic cialis 30 mg[/url] [url=http://opapills.com/]buy erectafil[/url] [url=http://zzmeds.com/]can you buy clomid over the counter in usa[/url] [url=http://cialistadalafilgeneric.com/]how much is cialis 10mg[/url] [url=http://xxlcialis.com/]mail pharmacy[/url] [url=http://otctablets.com/]best price zithromax 250mg[/url] [url=http://cialisedtr.com/]best price for tadalafil 20 mg[/url]

  38. 38 Buying Essay сказала в 16:38, 25.03.2021:

    [url=https://essaydoo.com/]guidelines to write an essay[/url] [url=https://domyhmwrk.com/]study help[/url]

  39. 39 SamHycle сказала в 17:59, 25.03.2021:

    [url=http://pharmx5.com/]plaquenil 800 mg[/url] [url=http://pplmeds.com/]furosemide 20 mg over the counter[/url] [url=http://mdcialis.com/]cialis 5 mg discount[/url] [url=http://norxstore.com/]online pharmacy for sale[/url] [url=http://sildenafilviagracialis.com/]generic viagra for sale in canada[/url] [url=http://keepills.com/]keflex over the counter[/url] [url=http://ffmeds.com/]levitra generic 20mg pills canadian pharmacy[/url] [url=http://viagracialistadalafil.com/]cialis brand[/url]

  40. 40 JimHycle сказала в 18:03, 25.03.2021:

    [url=https://drugstorewww.com/]online pharmacy store[/url] [url=https://gogoviagra.com/]woman viagra over the counter[/url]

  41. 41 WanceLeawsdape сказала в 19:39, 25.03.2021:

    write my essay for me [url=https://essaywritermsm.com/ ]help with homework [/url] essay writer reviews write an essay for me

  42. 42 WanceLeawsdape сказала в 20:13, 25.03.2021:

    payday loan lead aggregator [url=https://cashadvancerush.com/ ]emergency payday loans [/url] quick payday loan guaranteed payday loan

  43. 43 Jaimeded сказала в 20:28, 25.03.2021:

    Искали взять микрозайм 30000 срочно на карту? Тебе на сайт и попробуй оформить [url=https://ninlab.online/kredit-bez-spravok-po-pasportu.php]ninlab.online[/url] и получи микромикрозайм до 3000 рублей 100% процентов без проверки ркедитной истории без отказа.

    Срочно нужны наличные?

    Hаличные мгновенно

    Проверок кредитной историии нет. 98% одобрений.

  44. 44 Jaimeded сказала в 20:28, 25.03.2021:

    Нужен оформить микрозайм на карту до 30000? Тебе на сайт и попробуй оформить [url=https://ninlab.online/refinansirovanie-zajmov.php]ninlab.online[/url] и получи микромикрокредит до 7000 рублей 100% процентов без проверки КИ без отказа.

    Срочно понадобились деньги?

    Hаличные сразу

    Минимум проверок. 94% одобрений.

  45. 45 JackHycle сказала в 20:37, 25.03.2021:

    [url=https://saletadalafil.com/]purchase tadalafil online[/url] [url=https://pplmeds.com/]furosemide purchase[/url] [url=https://buycialishow.com/]cialis in canada cost[/url] [url=https://viagralab.com/]how to order generic viagra[/url] [url=https://jsonpharm.com/]how much is citalopram uk[/url] [url=https://cialismlt.com/]cialis medicine[/url] [url=https://ttbbshop.com/]tretinoin otc us[/url] [url=https://cialislevitraviagra.com/]cialis 5mg daily coupon[/url]

  46. 46 Help With My Essay сказала в 22:06, 25.03.2021:

    [url=http://homeworkhelp.us.org/]do your homework[/url]

  47. 47 LisaHycle сказала в 23:39, 25.03.2021:

    [url=https://icxhealth.com/]cheapest citalopram online[/url]

  48. 48 Writers Essay сказала в 0:14, 26.03.2021:

    [url=https://essaywritingserviceone.com/]jiskha homework help math[/url] [url=https://jeyessay.com/]importance of college education essay[/url] [url=https://writingservicecat.com/]proofreading services[/url]

  49. 49 KegoKibStodeneK сказала в 3:55, 26.03.2021:

    cash advance [url=https://fastloanandpayday.com/ ]easy payday loans online [/url] online payday direct loan cashadvancerush.com

  50. 50 JimHycle сказала в 6:46, 26.03.2021:

    [url=https://gogoviagra.com/]sildenafil 100mg india[/url] [url=https://cialisbbt.com/]cialis 10mg canada[/url] [url=https://gocialis.com/]buy cheap cialis online canada[/url] [url=https://onapharmacy.com/]pharmacy website[/url]


Оставить комментарий


  • × два = двенадать