Topic: db query
Hi everyone, I've got a problem with a mysql query..
I try to script a little video gallery for my punbb forum, but I'm too bad.
$name = pun_trim($_POST['name']);
$url = pun_linebreaks(addslashes($_POST['url']));
$desc = pun_linebreaks(addslashes($_POST['description']));
$poster = $pun_user['id'];
$cat = pun_trim($_POST['cat']);
$now = time();
//insert the video in the database
$db->query('INSERT INTO '.$db->prefix.'videos (name, url, desc, poster, cat, date) VALUES("'.$name.'", "'.$url.'", "'.$desc.'", "'.$poster.'", "'.$cat.'", "'.$now.'")') or error('Datenbankfehler: Konnte Video nicht einfügen', __FILE__, __LINE__, $db->error());
I get the DB Error, caused by $desc but I don't see any errors there. When I remove the description, the query works.
Any ideas?