> We run a PHP application which inserts freetext from a HTML > textarea field into an ASCII varchar field in our database. > The PHP application puts the content of that textarea field > in a query string and executes the query.
MaxDB does not support newlines in CHAR literals. Use prepare/execute instead // from http://www.devshed.com/c/a/PHP/Database-Abstraction-With-PHP/6/ // prepare query $insert = $dbh->prepare("INSERT INTO tracks (cd, track) VALUES (12, ?)"); // execute insert // run as many times as there are elements in $tracks foreach($tracks as $t) { $result = $dbh->execute($insert, $t); } If you pass the values as separate values to execute, then you don't have to worry about any special characters (except \0). And it will be more efficient if you can keep $insert around instead of creating it for each set of input values. Daniel Dittmar -- Daniel Dittmar SAP Labs Berlin [EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
