pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mike <mike@partner2partner.com>
To: pgsql-php@postgresql.org
Subject: Re: unable to insert rows with php
Date: Mon, 20 May 2002 13:31:22 GMT
Message-ID: <20020520133122.26244.qmail@conan.partner2partner.org> (raw)
In-Reply-To: <20020520120418.51354.qmail@web13902.mail.yahoo.com>
References: <20020520120418.51354.qmail@web13902.mail.yahoo.com>

ktt writes:
> printf ("ID : %s<br>\n", $row[0]);
> printf ("First Name: %s<br>\n", $row[1]);
> printf ("Surname : %s<br>\n", $row[2]);
> $query3 = "INSERT INTO friends (id, firstname,
> surname) values (nextval('friends_id_seq'),
> '$firstname', '$surname')";

You are not copying the values into the fields you are using in the INSERT 
statement: 

$firstname = $row[1];
$surname = $row[2]; 

Or 

$query3 = "INSERT INTO friends (id, firstname, surname) values 
(nextval('friends_id_seq'), '" . $row[1] . "', '" . $row[2] . "')"; 

Michael J. Upchurch
Partner2Partner Communications  mike@partner2partner.com  615.286.2199 




view thread (5+ messages)  latest in thread

Message-ID: <20020520133122.26244.qmail@conan.partner2partner.org>
Permalink:  ../20020520133122.26244.qmail@conan.partner2partner.org/
Also on:    postgresql.org/message-id/20020520133122.26244.qmail@conan.partner2partner.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: mike@partner2partner.com
  Subject: Re: unable to insert rows with php
  In-Reply-To: <20020520133122.26244.qmail@conan.partner2partner.org>
  References: <20020520120418.51354.qmail@web13902.mail.yahoo.com> <20020520133122.26244.qmail@conan.partner2partner.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox