Re: Lost data on insert query

From: Date: Fri, 18 Aug 2000 01:34:10 +0000
Subject: Re: Lost data on insert query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12389@lists.php.net to get a copy of this message
On 17 Aug, lance@dallypost.com wrote: > I am writing a script to store outgoing email messages to a > database. When I insert into the table, it only stores the first one > and a half sentences or so. > > The field that I am trying to insert to is a text type, I have also tried > long text with no difference. > > Can anyone tell me what is going on? > > Thanks, > > Lance Earl > > My code follows: > > > //post mail to history log > $notes = "To: "; > $notes .= $mailto; > $notes .= "\n\n"; > $notes .= "From: "; > $notes .= $mailfrom; > $notes .= "\n\n"; > $notes .= "Subject: "; > $notes .= $mailsubject; > $notes .= "\n\n"; > $notes .= $mailbody; > > //print("<BR><font color=red size=+2>TEST::notes = $notes > </font>");//Test Test Test > > $query = "insert into history > set date = now(), > memberid = $to, > action = '$action', > notes = '$notes'"; > $result = mysql_query ($query, $dp); > Are you using some method of escaping special characters, like one of the magic_quotes_xxx settings (seeing you aren't using addslashes) Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#12389) next »