Исправление синтаксических ошибок в бд

Статус
В этой теме нельзя размещать новые ответы.

TIIIMOXAN

Гуру форума
Регистрация
1 Сен 2009
Сообщения
403
Реакции
74
Приветствую!

При переводе моей базы данных (именно дампа) с русского на английский язык,возникла масса синтаксических ошибок.

Вопрос,существует ли какой-нибудь скрипт или программа,которая сможет это дело все исправить,т.к. база большая и вручную это не реально.

Заранее благодарен.
 
а кусок дампа с ошибками можно посмотреть?
 
а кусок дампа с ошибками можно посмотреть?

INSERT IGNORE dle_category (id, parentid, posi, name, alt_name, news_number) VALUES (60,0, 1, 'Action', 'boeviki', 10),
(61,0, 1, 'Thriller', 'triller', 10),
(62,0, 1, 'Comedy', 'comedy', 10),
(63,0, 1, 'Drama', 'dram', 10),
(64,0, 1, 'Fantastic', 'fantastik', 10),
(65,0, 1, 'Mystery', 'mistik', 10),
(66,0, 1, 'Adventure', 'priclucheni', 10),
(67,0, 1, 'Fantasy', 'fentezy', 10),
(68,0, 1, 'Animation', 'mult', 10),
(69,0, 1, 'Family', 'semeinie', 10),
(70,0, 1, 'Horror', 'uzasi', 10),
(71,0, 1, 'Romance', 'melodram', 10),
(72,0, 1, 'History', 'istorik', 10),
(73,0, 1, 'Military', 'voina', 10),
(88,0, 1, 'Arthouse', 'Arthouse', 10),
(75,0, 1, 'Domestic', 'otechestvo', 10),
(76,0, 1, 'Detective', 'detectiv', 10),
(77,0, 1, 'Musicals', 'musikl', 10),
(86,0, 1, 'Comedy', 'umor', 10),
(87,0, 1, 'Trailers', 'treiler', 10),
(85,0, 1, 'Series', 'serials', 10),
(81,0, 1, 'Sport', 'sport', 10),
(89,0, 1, 'Filmography', 'Filmography', 10),
(83,0, 1, 'Documentary', 'documental', 10),
(84,0, 1, 'Erotica', 'erotika', 10),
(90,0, 1, 'Adult', 'VZROSLUE', 10),
(91,0, 1, 'Soundtracks', 'soundtrack', 10);

INSERT IGNORE dle_post (autor, date, short_story, full_story, title, descr, keywords, category, allow_comm, allow_main, allow_rate, approve, allow_br) VALUES ('','','< img src = \ 'http://knstats .com/uploads4/18093.jpg \ '> <br/> <p> <strong> Description: </ strong> celebrated young writer once made a wrong choice, stuck in an emotional trap from which it can not find a way out. A talented actress, who suffers from narcolepsy is locked in svom luxurious house and suspects her husband of infidelity. Finally, a beginning he can not get out from under parental care and live in their own way. Coincidence leads to the fact that their paths cross. Everyone on impulse again come to life and begins to once again find their own path, which again can happen love, hate, betrayal, death ... all. </ p >','< img src = \ 'http://knstats.com/uploads4 / 18093.jpg \ '> <br/> <p> <strong> <span style=\"font-size: small;\"> Drowsiness </ span> </ strong> </ p> <strong> Genre: </ strong> Drama <br /> <strong> Year </ strong>: 2008 <br /> <strong> Directed by: </ strong> Magdalena Piekorz <br /> <strong> Starring: </ strong> Malgorzata Kozuhovskaya, Michal Zebrowski, Rafal Makovyak, Bartosz Obukhovich, Krzysztof Zavadzhki, Andrzej Grabowski <br /> <p> <strong> Description: </ strong> celebrated young writer once made a wrong choice, stuck in an emotional trap, from which can not find a way out. talented actress suffering from narcolepsy, locked in svom luxurious house and suspects her husband of infidelity. Finally, a beginning he can not get out from under parental care and live in their own way. Coincidence leads to the fact that their paths intersect . Everyone on impulse again come to life and begins to once again find their own path, which again can happen love, hate, betrayal, death ... all. </ p> <strong> size </ strong>: 1.46 GB < br /> <strong> Video Quality: </ strong> BDRip <br /> <strong> Video: </ strong> XviD, 720x384, 24 fps, 1596 kbps <br /> <strong> Audio: </ strong> Amateur (odnogolosy), AC3, 384 kb / s (6 ch) <br /> ',' Drowsiness Drowsiness','',' ', '63, 71', 1,1,1,1,1),
('','','< Img src = \ 'http://knstats.com/uploads4/18091.jpg \'> <br/> <p> <strong> Description: </ strong> you are waiting for three stories woven in an unpredictable ball studio directing Dag Limana.Utrom charming cashier Ron meets a strange couple, day leaves his girlfriend to the mortgage, the evening turns into a roadside ditch with no signs of zhizni.Narkodelets Simon starts the day in the trunk of the car, still burns in his room with two Women and finishes race without any rules on the streets of Las Vegasa.Sladkaya couple Zac and Adam the whole day helping the police, getting everything else for that in the end awarded the honor to dine with witted servant zakona.Mezhdu so such different stories expects the same unpredictable final ... </ p >','< img src = \ 'http://knstats.com/uploads4/18091.jpg \'> <br/> <p> <strong> <span style = \ "font-size: small; \ "> Ecstasy </ span> </ strong> </ p> <strong> Genre: </ strong> Comedy, Crime, Thriller <br /> <strong> Year </ strong>: 1999 <br / > <strong> Directed by: </ strong> Doug Liman <br /> <strong> Starring: </ strong> Desmond Eskew, Tay Diggz, James I. Freeman, Jane Krakowski, William Fichtner, Katie Holmes <br /> <p> <strong> Description: </ strong> are waiting for you three stories, woven in an unpredictable ball of the studio directing Dag Limana.Utrom charming cashier Ron meets a strange couple, day leaves his girlfriend to the mortgage, the evening turns into a roadside ditch with no signs of life . drug dealer Simon starts the day in the trunk of the car, still burns in his room with two women and finishes race without any rules on the streets of Las Vegasa.Sladkaya couple Zac and Adam the whole day helping the police, getting everything else for that in the end awarded the honor to dine with witted servant zakona.Mezhdu topics such different stories expects the same unpredictable final ... </ p> <strong> size </ strong>: 1.46 GB <br /> <strong> Video Quality: </ strong> BDRip <br /> <strong> Video: </ strong> XviD, 720x304, 23.976fps, 1648 kbps <br /> <strong> Audio: </ strong> Dubbed, AC3, 384 kb / s (6 ch) <br /> ' 'Ecstasy Ecstasy','','', '61, 62.71 ', 1,1,1,1,1),
('','','< Img src = \ 'http://knstats.com/uploads4/18090.jpg \'> <br/> <p> <strong> Description: </ strong> The film is set in occupied France. In the eyes of Suzanne Dreyfus at the hands of a German Colonel Hans Landa killed her family. The girl miraculously manage spastic and flee to Paris. There she finds a job in a cinema. At the same time, somewhere in Europe, Lieutenant Aldo Raine gathers a group of Jewish soldiers, calling themselves the "bastard". adjoins to them undercover agent Bridget Von Hammersmark pretending to be an actress. The two plot lines intersect, where saboteurs have encountered in a movie theater with Suzanne, who dreams revenge. </ p >','< img src = \ 'http://knstats.com/uploads4/18090.jpg \'> <br/> <p> <strong> <span style=\"font-size: small;\"> Inglorious Bastards </ span> </ strong> </ p> <strong> Genre: </ strong> Drama, War <br /> <strong> Year </ strong>: 2009 <br /> <strong> Directed by: </ strong> Quentin Tarantino <br /> <strong> Starring: </ strong> Brad Pitt, Melanie Laurent, Christoph Waltz, Eli Roth, Michael Fassbender, Diane Kruger, Daniel Bruhl, Til Schweiger, Gedeon Burkhard, Jacky Ido, Mike Myers, John Pallaske < br /> <p> <strong> Description: </ strong> The film is set in occupied France. In the eyes of Suzanne Dreyfus at the hands of a German Colonel Hans Landa killed her family. The girl miraculously manage spastic and flee to Paris. There she finds a work in the theater. At the same time, somewhere in Europe, Lieutenant Aldo Raine gathers a group of Jewish soldiers, calling themselves the "bastard". adjoins to them undercover agent Bridget Von Hammersmark pretending to be an actress. The two plot lines intersect, where saboteurs have found in a movie theater with Suzanne, who dreams revenge. </ p> <strong> Size </ strong>: 1.37 GB <br /> <strong> Video: </ strong> XviD, 1178 kb / s, 704x320 <br /> <strong> Audio: </ strong> Dubbed, MP3, 128 kb / s (2 ch) <br /> ',' Inglorious Bastards Inglorious Bastards','',' ', '61, 63.73', 1, 1,1,1,1)
('','','< Img src = \ 'http://knstats.com/uploads4/18084.jpg \'> <br/> <p> <strong> Description: </ strong> hero Bruce Lee is arranged to the factory for the production of ice and tries to behave well and not let his fists yarosti.No mysteriously disappear when his family (they are killed as unwanted witnesses to the crimes of the drug mafia - they had seen in the blocks of ice packed drugs), Bruce runs a business not only fists and feet with rage. </ p >','< img src = \ 'http://knstats.com/uploads4/18084.
jpg \ '> <br/> <p> <strong> <span style=\"font-size: small;\"> Big Boss </ span> </ strong> </ p> <strong> Genre: </ strong> Drama, Action, Crime, Thriller <br /> <strong> Year </ strong>: 1971 <br /> <strong> Directed by: </ strong> Wei Lo, Jiaxiang Wu <br /> <strong> In Cast: </ strong> Bruce Lee, Maria Yi, James Tien, Yin-Chie Han, Tony Liu, Quin Lee <br /> <p> <strong> Description: </ strong> hero Bruce Lee gets a factory for the production of ice and tries to behave well and not let his fists yarosti.No mysteriously disappear when his family (they are killed as unwanted witnesses of crime, the drug mafia - they had seen in the blocks of ice packed drugs), Bruce runs to the cause of not only his fists and feet rage. </ p> <strong> Size </ strong>: 1.46 GB <br /> <strong> Quality Video: </ strong> BDRip <br /> <strong> Video: </ strong> XviD, 720x304, 23.976fps, 1695 kbps <br /> <strong> Audio: </ strong> Professional (dvuhgolosy), AC3, 384 kb / s (6 ch) <br /> ',' Big Boss','',' Big Boss ', '60, 61.63', 1,1,1,1,1),
('','','< Img src = \ 'http://knstats.com/uploads4/18083.jpg \'> <br/> <p> <strong> Description: </ strong> Vinny Gambini dreamed of becoming even when the lawyer was sitting behind bars. So when a cousin asked Bill to save him from prison, he realized that the "star" h Vincent Gambini nastal.A faces reckless Bill and his pal Stan lot - they wrongly accused of murdering dealer in town, where they were passing through. Thinking that they are accused of petty shoplifting, they signed priznaniya.U naive coarse Pooh parody of a lawyer who had never been in court, there is, however, the secret weapon - the ability to make trouble tirelessly for hours on end . He and his glib tongue, sexy girlfriend Mona Lisa go to a small town to get this pair of bedy.Pochtennomu population of the city and its justice system to experience the most profound shock in its history ... </ p >','< img src = \ 'http://knstats.com/uploads4/18083.jpg \'> <br/> <p> <strong> <span style=\"font-size: small;\"> My Cousin Vinny </ span> </ strong> </ p> <strong> Genre: </ strong> Comedy, Crime <br /> <strong> Year </ strong>: 1992 <br /> <strong> Directed by: </ strong> Jonathan Lynn <br /> <strong> Starring: </ strong> Joe Pesci, Ralph Mackey, Marisa Tomei, Mitchell Whitfield, Fred Gwynne, Lane Smith <br /> <p> <strong> Description: </ strong> Winnie Gambini dreamed of becoming a lawyer even when sitting behind bars. So when a cousin asked Bill to save him from prison, he realized that the "star" h Vincent Gambini nastal.A faces reckless Bill and his pal Stan lot - they wrongly accused of murdering dealer in the town where they were passing through. Thinking that they are accused of petty shoplifting, they signed priznaniya.U naive coarse Winnie, a parody on a lawyer who had never been in court, there is, however, the secret weapon - the ability to make a scene without tirelessly for hours on end. He and his glib tongue, sexy girlfriend Mona Lisa go to a small town to get this pair of bedy.Pochtennomu population of the city and its justice system to experience the most profound shock in its history ... </ p> <strong > Size </ strong>: 2.18 GB <br /> <strong> Video: </ strong> XviD, 720x384, 23.976fps, 2038 kbps <br /> <strong> Audio: </ strong> Professional (Polyphony) + Original, AC3, 192 kb / s (2 ch) + AC3, 384 kb / s (6 ch) <br /> ',' My Cousin Vinny My Cousin Vinny','',' ', '62', 1, 1,1,1,1)
('','','< Img src = \ 'http://knstats.com/uploads4/18079.jpg \'> <br/> <p> <strong> Description: </ strong> Starman arrives to Earth with one goal: to find out what love is. He landed somewhere in Wisconsin, and decides to take shape late husband's modest widow Jenny Hayden. He learns from Jenny, what love is, and he did not want to return to the ship. But his fellow aliens believe that, left, Starman will die. Also, strange resurrection of her husband Jenny asked the police. </ p >','< img src = \ 'http://knstats.com/uploads4/18079 . jpg \ '> <br/> <p> <strong> <span style=\"font-size: small;\"> Starman </ span> </ strong> </ p> <strong> Genre: </ strong> Romance, Drama, Adventure, Sci-Fi <br /> <strong> Year </ strong>: 1984 <br /> <strong> Directed by: </ strong> John Carpenter <br /> <strong> Cast : </ strong> Jeff Bridges, Karen Allen, Charles Martin Smith, Richard Jackel, Tony Edwards, John Walter Davis <br /> <p> <strong> Description: </ strong> Starman arrives on Earth with the sole purpose of: find out what love is. He landed somewhere in Wisconsin, and decides to take shape late husband's modest widow Jenny Hayden. He learns from Jenny, what love is, and he did not want to return to the ship. But his fellow aliens are considered that left a man with a star dies. Also, strange resurrection of her husband Jenny asked the police. </ p> <strong> size </ strong>: 2.18 GB <br /> <strong> Video: </ strong> XviD , 720x304, 23.976fps, 1950 kbps <br /> <strong> Audio: </ strong> Dubbed [Soviet dub] + Authors [Lesch, AC3, 192 kbps, (1 ch) + AC3, 192 kbps, (2 ch) + AC3, 384 kbps, (6 ch) <br /> ',' Starman','',' Starman ', '61, 63,64,66,71', 1,1,1,1 , 1)
('','','< Img src = \ 'http://knstats.com/uploads4/18062.jpg \'> <br/> <p> <strong> Description: </ strong> Chen began to pursue vision perpetrated by someone of murder. He had to find an unknown assassin, or appearing in the nightmares of the ghost will not leave him alone. "Each time, Chen increasingly difficult to distinguish where the truth and hallucination inflamed consciousness, while continuing to claim lives around. In 2008 year at the Thailand National Film Association Awards film received the award for best special effects and eight nominations in other categories! </ p >','< img src = \ 'http://knstats.com/uploads4/18062.jpg \'> < br /> <p> <strong> <span style=\"font-size: small;\"> body № 19 </ span> </ strong> </ p> <strong> Genre: </ strong> Drama, Mystery, Horror <br /> <strong> Year </ strong>: 2007 <br /> <strong> Director: </ strong> Pavin Purikitpani <br /> <strong> Starring: </ strong> Arak Amornsupasiri, Ornzhira Lamvilay, Kriterra Inpornvizhit, Patharavarin Timkul <br /> <p> <strong> Description: </ strong> Chen began to pursue the vision perpetrated by someone of murder. He was forced to seek an unknown assassin, or appearing in the nightmares of the ghost will not leave him alone . Each time, Chen increasingly difficult to distinguish where the truth and hallucination inflamed consciousness, while continuing to claim lives around. In 2008, the Thailand National Film Association Awards the film won for best special effects and eight nominations in other categories: </ p> <strong> size </ strong>: 700 MB <br /> <strong> Video Quality: </ strong> DVDRip <br /> <strong> Video: </ strong> XviD, 720x320, 25.00fps, 692Kbps <br /> <strong> Audio: </ strong> Creative dvuhgolosy озвучка: ChrisTref and zamez, MP3, 112Kbps <br /> ',' Body № 19','',' body № 19 ', '63, 65, 70 ', 1,1,1,1,1),
('','','< Img src = \ 'http://knstats.com/uploads4/18056.jpg \'> <br/> <p> <strong> Description: </ strong> Kim Sung, South Korea champion taekwon-do, wins the tournament on the world title from the American rival. Returning to Korea from Las Vegas, Kim discovers that his wife died in childbirth, leaving a newborn daughter ... Eight years later, a lone father, Kim caught by eye boss gangsters. having heard about the exploits of Kim, the mafia will do everything possible to involve him in the underground world of illegal fights. </ p >','< img src = \ 'http://knstats.com/uploads4/18056.jpg \ '> <br/> <p> <strong> <span style=\"font-size: small;\"> King Cells </ span> </ strong> </ p> <strong> Genre: </ strong> Action <br /> <strong> Year </ strong>: 2004 <br /> <strong> Director: </ strong> Doo Young Kim <br /> <strong> Cast: <% 2

Fstrong> Steven Seagal, Dong Joon Lee, Hey-ri Kim, Ho Lim, Joe Halpin, Simon Reeh, Bong Joo Ji <br /> <p> <strong> Description: </ strong> Kim Sung, South Korean champion in Taekwon-Do up, wins the tournament on the world title at the American rival. After returning to Korea from Las Vegas, Kim discovers that his wife died in childbirth, leaving the newborn daughter ... Eight years later, father lone Kim catches the eye of the boss gangsters. Having heard about the exploits of Kim, the mafia will do everything possible to draw him into the underground world of illegal fights. </ P> <strong> size </ strong>: 1.37 GB <br /> <strong> Video Quality: </ strong> DVDRip <br /> <strong> Video: </ strong> XviD, 1502 kb / s, 640x480 <br /> <strong> Audio: </ strong> Professional (many-voiced, voice-over), AC3, 448 kb / s (2 ch ) <br /> ',' King Cells','',' King Cells ', '60', 1,1,1,1,1)


а вот то что пишет,кароче очень много таких и разных....))))


SQL-запрос:

INSERT IGNORE dle_post (autor, date, short_story, full_story, title, descr, keywords, category, allow_comm, allow_main, allow_rate, approve, allow_br) VALUES ('','','< img src = \ 'http://knstats .com/uploads4/18093.jpg \ '>

Description: celebrated young writer once made a wrong choice, stuck in an emotional trap from which it can not find a way out. A talented actress, who suffers from narcolepsy is locked in svom luxurious house and suspects her husband of infidelity. Finally, a beginning he can not get out from under parental care and live in their own way. Coincidence leads to the fact that their paths cross. Everyone on impulse again come to life and begins to once again find their own path, which again can happen love, hate, betrayal, death ... all. ','< img src = \ 'http://knstats.com/uploads4 / 18093.jpg \ '>

Drowsiness Genre: Drama
[...]

Ответ MySQL:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://knstats .com/uploads4/18093.jpg \ '> <br/> <p> <strong> Description: </ s' at line 1
 
Код:
VALUES ('','','< img src = \ 'http://knstats .com/uploads4/18093.jpg \ '>

после символа \ и перед одинарной кавычкой лишний пробел
 
chang,да там уйма,и не только пробелов,дофига кароче нарушений в синтаксисе.
Вот я и спрашиваю,можно ли программным путем решить синтаксические ошибки?
 
проги которая бы это исправила явно нет

решение влоб - выделить группы повторяющихся ошибок ну и написать для них регулярки чтоб заменило текст

вставьте кусок дампа в какой-то sql редактор ( например dbforge ) - он подсветит код и подскажет ошибки, так будет их проще выявить
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху