Re: Update problem

From: Ângelo Marcos Rigo <angelo_rigo(at)yahoo(dot)com(dot)br>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Update problem
Date: 2003-08-19 17:52:54
Message-ID: 20030819175254.71587.qmail@web14807.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

No I am not using, i will try now. How do you use it
?pg_escape_string($sql) ?

--- "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> escreveu:
> I'm gonna guess that you've got CRs embedded or
> other text that needs
> escaping. Are you using pg_escape_string before the
> insert?
>
> On Tue, 19 Aug 2003, Ângelo Marcos Rigo wrote:
>
> > Hi Scott
> >
> > It´s strange but whith a little amount of text the
> > update works.
> > I have the same script with text field and it
> works
> > fine.
> >
> > Now that i am using textarea because it handle a
> full
> > magazine article it is not working i do print
> $query
> > on the final script and return null.
> >
> > It updates the title and abstract but the article
> wich
> > has a huge amount of text (with html tags inserted
> > from a built in javascript html editor).
> >
> > Thank´s in advance
> >
> > --- "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com>
> escreveu:
> > > On Tue, 19 Aug 2003, Ângelo Marcos Rigo wrote:
> > >
> > > > I have an update escript that works fine with
> text
> > > > fields but with an textarea version the script
> is
> > > > passing an empty value, for the "texto" field
> > > > Here is a snip of code that receives the
> values:
> > > >
> > > > $id = $_POST['id'];
> > > > $titulo = $_POST['titulo'];
> > > > $resumo = $_POST['resumo'];
> > > > $texto = $_POST['texto'];
> > > > print_r($texto);
> > > > include 'db.php';
> > > > $query = "UPDATE revista SET
> titulo='$titulo',
> > > > resumo='$resumo', texto='$texto' WHERE
> id='$id'";
> > > >
> > > > here is the "texto" field where i do write the
> > > > modifications to be updated:
> > > >
> > > > print ("<tr><td>Texto</td><td><textarea
> > > cols=\"90\"
> > > > rows=\"20\" value=\"$myrow[3]\"
> > > >
> name=\"texto\">$myrow[3]</textarea></td></tr>");
> > >
> > > Hi Ângelo, welcome to the php list.
> > >
> > > Is the problem that the FORM is printed with an
> > > empty text area, or that,
> > > after entering text into the textarea that it
> > > doesn't get inserted into
> > > the database upon submission?
> > >
> > >
> > > ---------------------------(end of
> > > broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with
> the
> > > unregister command
> > > (send "unregister YourEmailAddressHere" to
> > majordomo(at)postgresql(dot)org)
> >
> > =====
> > Ângelo Marcos Rigo
> > AMR Informática
> > (51) 3348 0870
> > Rua Pe. Alois Kades 400/210
> > Porto Alegre /RS/Brasil
> > http://amr.freezope.org
> > angelo_rigo(at)yahoo(dot)com(dot)br
> >
> >
> >
> >
>
_______________________________________________________________________
> > Desafio AntiZona - Um emocionante desafio de
> perguntas e respostas que
> > te dá um Renault Clio, kits de eletrônicos,
> computadores, notebooks e
> > mochilas. Cadastre-se, participe e concorra!
> > www.cade.com.br/antizona
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> >
> http://www.postgresql.org/docs/faqs/FAQ.html
> >
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please
> send an appropriate
> subscribe-nomail command to
> majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list
cleanly

=====
Ângelo Marcos Rigo
AMR Informática
(51) 3348 0870
Rua Pe. Alois Kades 400/210
Porto Alegre /RS/Brasil
http://amr.freezope.org
angelo_rigo(at)yahoo(dot)com(dot)br

_______________________________________________________________________
Desafio AntiZona - Um emocionante desafio de perguntas e respostas que
te dá um Renault Clio, kits de eletrônicos, computadores, notebooks e
mochilas. Cadastre-se, participe e concorra!
www.cade.com.br/antizona

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Martin Marques 2003-08-20 15:04:45 Re: Postgres connection
Previous Message scott.marlowe 2003-08-19 17:31:09 Re: Update problem