Вот мой кодНе удается вставить данные в базу данных MySQL
mysql_connect('localhost', 'root', 'password');
mysql_select_db('db');
mysql_query("INSERT INTO metabase(url, title, image, description) VALUES('http://www.imgur.com/', '$title', '$image', '$descr')") or die();
Она не показывает какие-либо ошибки, но значения не вставляются в базу данных. Имя моей таблицы - метабаза. url, title, images - varchar (255) и текст описания. Это ошибка
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 's visual storytelling community. Explore, share, and discuss the best visual sto' at line 1
Это описание
The Internet's visual storytelling community. Explore, share, and discuss the best visual stories the Internet has to offer.
Так что из-за '
как я это исправить?
Каковы типы полей в базе данных и есть ли отчеты об ошибках? –
Изменить 'die()' to 'die (mysql_error())' – TiiJ7
или умереть (mysql_error()); не отображается никаких ошибок? – daremachine