Задать вопрос
@iSensetivity
бухгалтер, програміст-самоук

Почему в PHPMyAdmin запрос проходит а с PHP нет?

Вообшем генерирую на php запрос:
INSERT INTO `anime_long` (`aid`, `mal_id`, `MPAA`) VALUES (NULL, '6772', 'R - 17+ (violence & profanity)'); INSERT INTO `anime_short` (`aid`, `title_uk`, `title_en`, `title_rom`, `title_kan`, `title_others`, `poster`, `synopsis`, `type`, `series_count`, `date_begin`, `date_end`) VALUES (LAST_INSERT_ID(), '', 'Broken Blade', 'Break Blade 1: Kakusei no Toki', 'ブレイク ブレイド 覚醒ノ刻', 'Breaker Blade, Break Blade 1: The Time of Awakening', 'http://cdn.myanimelist.net/images/anime/3/18281l.jpg', 'In the continent of Cruzon, an impending war between the Kingdom of Krisna and the nation of Athens is brimming. The people of this land are able to use quartz for whatever purpose they desire. Yet one person, Rygart Arrow, is not. He is an \"un-sorcerer,\" a person unable to use quartz. But this characteristic will enable him to pilot an ancient Golem, one strong enough to put up a fight against the invading army of Athens.', '1', '1', '2010-05-29', '1970-01-01');

Вьіполнию на php
$result = mysql_query($q) or die("Invalid query: " . mysql_error());

И получаю ошибку: "Invalid query: 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 'INSERT INTO `anime_short` (`aid`, `title_uk`, `title_en`, `title_rom`, `title_ka' at line 1"
Но в тоже время запрос исполняеться в phpmyadmin.
Почему так происходит и как вьіполнить запрос с php?
  • Вопрос задан
  • 2705 просмотров
Подписаться 5 Комментировать
Подписчики вопроса 5 К ответам на вопрос (3)