Re: [PHP-DB] Can't Insert more than 1 record

2003-04-04 Thread Ronan Chilvers
Hi KJ

On 03 Apr,2003 at 22:18 Keven Jones wrote:

snip
 attempt after the 1st fails. I have
 to delete the existing row in order
 to add a new record.
/snip

Sounds like you have auto-incremented unique indices to me - are you always trying to 
insert with an index of 1 ?  Without seeing the code its hard to say

snip
 
 Anyone know what I am doing incorrectl?
 
 KJ
 
/snip
-- 
Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com

The Little Dot is a partnership of
Ronan Chilvers and Giles Webberley

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Can't Insert more than 1 record

2003-04-04 Thread Alexa Kirk
If you are violating a primary key, try creating a sequence, and then
passing this sequence name (i.e. nID.NextVal) as your parameter in the
values of your query. This will automatically give you a new unique
number in the sequence you created. 

Lex

-Original Message-
From: Keven Jones [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2003 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Can't Insert more than 1 record

Hello All,

I am having a problem inserting records
into my Database.  I am passing fields
from a FORM to my php program that adds
1 record to my DB. It will create the
first attempt just fine, however any
attempt after the 1st fails. I have
to delete the existing row in order
to add a new record.

Anyone know what I am doing incorrectl?

KJ





_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Keven Jones
Hello All,

I am having a problem inserting records
into my Database.  I am passing fields
from a FORM to my php program that adds
1 record to my DB. It will create the
first attempt just fine, however any
attempt after the 1st fails. I have
to delete the existing row in order
to add a new record.
Anyone know what I am doing incorrectl?

KJ





_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Rich Gray
 Hello All,

 I am having a problem inserting records
 into my Database.  I am passing fields
 from a FORM to my php program that adds
 1 record to my DB. It will create the
 first attempt just fine, however any
 attempt after the 1st fails. I have
 to delete the existing row in order
 to add a new record.

 Anyone know what I am doing incorrectl?

 KJ

Do you have unique indexes on your table? On each insert are you sure that
the unique index columns are actually unique? What errors do you get on the
second++ inserts?
Rich


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Jennifer Goodie
Not without looking at your queries and code.  Posting those might make it
easier for people to answer your question.  I could make a lot of guesses
though.  First guess is your query is incorrect.

 -Original Message-
 From: Keven Jones [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 03, 2003 2:18 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Can't Insert more than 1 record


 Hello All,

 I am having a problem inserting records
 into my Database.  I am passing fields
 from a FORM to my php program that adds
 1 record to my DB. It will create the
 first attempt just fine, however any
 attempt after the 1st fails. I have
 to delete the existing row in order
 to add a new record.

 Anyone know what I am doing incorrectl?

 KJ


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Leif K-Brooks
I haven't used my psychic powers for a while, but I think the problem is 
on line 35.

Keven Jones wrote:

Hello All,

I am having a problem inserting records
into my Database.  I am passing fields
from a FORM to my php program that adds
1 record to my DB. It will create the
first attempt just fine, however any
attempt after the 1st fails. I have
to delete the existing row in order
to add a new record.
Anyone know what I am doing incorrectl?

KJ





_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Cal Evans
HAR!

Ok, seriously though, does your script return an error of any kind?  Sounds
like you are violating a primary or unique key in the second insert.

What database engine are you using?

=C=
- Original Message -
From: Leif K-Brooks [EMAIL PROTECTED]
To: Keven Jones [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 5:13 PM
Subject: Re: [PHP-DB] Can't Insert more than 1 record


 I haven't used my psychic powers for a while, but I think the problem is
 on line 35.

 Keven Jones wrote:

  Hello All,
 
  I am having a problem inserting records
  into my Database.  I am passing fields
  from a FORM to my php program that adds
  1 record to my DB. It will create the
  first attempt just fine, however any
  attempt after the 1st fails. I have
  to delete the existing row in order
  to add a new record.
 
  Anyone know what I am doing incorrectl?
 
  KJ
 
 
 
 
 
  _
  Tired of spam? Get advanced junk mail protection with MSN 8.
  http://join.msn.com/?page=features/junkmail
 
 

 --
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php