Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread Raditha Dissanayake
John Nichel wrote: Greg Donald wrote: On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake <[EMAIL PROTECTED]> wrote: many people in this list believe that people who do not RTFM are lazy and do not deserve help. That's because people who expect free help without RTFM are lazy and do not deserv

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread Greg Donald
On Thu, 25 Nov 2004 11:43:56 +0600, Raditha Dissanayake <[EMAIL PROTECTED]> wrote: > hey greg, don't jump on me, i was trying to say the same thing you are > saying perhaps i should have worded it better :-)) Sorry if I offended you. -- Greg Donald Zend Certified Engineer http://gdconsultants.c

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread John Nichel
Greg Donald wrote: On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake <[EMAIL PROTECTED]> wrote: many people in this list believe that people who do not RTFM are lazy and do not deserve help. That's because people who expect free help without RTFM are lazy and do not deserve help. How else d

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Raditha Dissanayake
Greg Donald wrote: On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake <[EMAIL PROTECTED]> wrote: many people in this list believe that people who do not RTFM are lazy and do not deserve help. That's because people who expect free help without RTFM are lazy and do not deserve help. How

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Greg Donald
On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake <[EMAIL PROTECTED]> wrote: > many people in this list believe that people who do not RTFM are lazy > and do not deserve help. That's because people who expect free help without RTFM are lazy and do not deserve help. How else do you plan to l

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Raditha Dissanayake
Johan van Zyl wrote: Hi Thx Helen for another non-hostile, and as usual, very informative response! We newbie's are having a though time, well at least in THIS forum! At least I am! You (me) apparently have to RTFM or FO many people in this list believe that people who do not RTFM are lazy and

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread David Bevan
On November 24, 2004 17:47, Johan van Zyl wrote: > It is not easy being a PHP newbie! > If I am supposed to study ALL manuals in great detail before I am allowed > to ask a question here.? > Its not that you have to read all of the manuals and books. You just need to take some time to figure

Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Greg Donald
On Thu, 25 Nov 2004 00:47:10 +0200, Johan van Zyl <[EMAIL PROTECTED]> wrote: > If I am supposed to study ALL manuals in great detail before I am allowed to > ask a question here.? It's not about "allowed" ( your post made it to my inbox without issue) or not, but please do consider the high-tr

[PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Johan van Zyl
d-php] auto increment last insert At 09:01 AM 25/11/2004 +1100, you wrote: >I've just arrived in the office - did this thread get completed? >Is the original poster satisfied with the information? > >Basically, a set-by-step approach to replacing MySQL's aut

Re: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread Curt Zirzow
* Thus wrote Jay Blanchard: > [snip] > i've got a strange problem with a MySQL table. although my 'id' column > is set to 'auto_increment', each new record i insert has the value 1. > (instead of 1, 2, 3, etc.) > > i checked my sql statement and i'm not assigning the id value by > mistake. here is

Re: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread barophobia
On Mon, 12 Jul 2004 15:36:20 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > The guys on the MySQL list do. Have you read this--> > http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html not for this issue no. the problem for those that read this later is not that i am using multiple pr

Re: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread Justin Patrin
Your primary key should be only (`id`). On Mon, 12 Jul 2004 13:04:19 -0700, barophobia <[EMAIL PROTECTED]> wrote: > hello. > > i've got a strange problem with a MySQL table. although my 'id' column > is set to 'auto_increment', each new record i insert has the value 1. > (instead of 1, 2, 3, etc.

RE: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread Jay Blanchard
[snip] i've got a strange problem with a MySQL table. although my 'id' column is set to 'auto_increment', each new record i insert has the value 1. (instead of 1, 2, 3, etc.) i checked my sql statement and i'm not assigning the id value by mistake. here is my create statement (showing only a few c

[PHP] auto-increment not working?? MySQL

2004-07-12 Thread barophobia
hello. i've got a strange problem with a MySQL table. although my 'id' column is set to 'auto_increment', each new record i insert has the value 1. (instead of 1, 2, 3, etc.) i checked my sql statement and i'm not assigning the id value by mistake. here is my create statement (showing only a few

RE: [PHP] auto increment

2004-02-17 Thread Chris Shiflett
--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote: > > If the id is auto increment, can't you use max(id) to get the last > > inserted one? > > only if you are the absolute only person that will ever be connected to > that db at one time. otherwise the answer is no. > > what if in between your INSE

RE: [PHP] auto increment

2004-02-17 Thread Chris W. Parker
BAO RuiXian on Tuesday, February 17, 2004 11:32 AM said: > If the id is auto increment, can't you use max(id) to get the last > inserted one? only if you are the absolute only person that will ever be connected to that db at one time. otherwise the answer is no. wh

Re: [PHP] auto increment

2004-02-17 Thread BAO RuiXian
marc serra wrote: Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. If the id is auto increment, can't you use max(id) to get the last inserted one? Best Bao I see that I can use sequences but it doesn't work with mysq

RE: [PHP] auto increment

2004-02-17 Thread Peter Billen
execute the following query: SELECT LAST_INSERT_ID(); Peter -Original Message- From: marc serra [mailto:[EMAIL PROTECTED] Sent: dinsdag 17 februari 2004 20:17 To: [EMAIL PROTECTED] Subject: [PHP] auto increment Hi, i use PEAR DB with a mysql database and i want to know if there

Re: [PHP] auto increment

2004-02-17 Thread Chris Shiflett
--- marc serra <[EMAIL PROTECTED]> wrote: > i use PEAR DB with a mysql database and i want to know if there is a > solution to get last inserted id in a table. > > I see that I can use sequences but it doesn't work with mysql. There is this: http://www.php.net/mysql_insert_id Hope that helps.

[PHP] auto increment

2004-02-17 Thread marc serra
Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. I see that I can use sequences but it doesn't work with mysql. Thanks, Marc.

RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
chenkov [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 5:35 AM To: Faisal Abdullah Cc: Marek Kilimajer; PHP Subject: Re: [PHP] Auto-increment value Dear Faisal Abdullah, Once you wrote about "RE: [PHP] Auto-increment value": > > There is a similar one for postgresq

Re: [PHP] Auto-increment value

2002-09-18 Thread Leonid Mamtchenkov
Dear Faisal Abdullah, Once you wrote about "RE: [PHP] Auto-increment value": > > There is a similar one for postgresql as well: pg_last_oid() . > > I tried that. It gives me 24807, instead of 5. > Or is oid is a reference to something else, which would > lead m

Re: [PHP] Auto-increment value

2002-09-18 Thread bob parker
From: Marek Kilimajer <[EMAIL PROTECTED]> To: PHP <[EMAIL PROTECTED]> Subject: Re: [PHP] Auto-increment value You encounter a race condition bob parker wrote: >SELECT idno ORDER BY idno DESC LIMIT 1; >assuming idno

Re: [PHP] Auto-increment value

2002-09-18 Thread Justin French
I tend to (if I can't use mysql_last_id) insert a unique key into the row, and pull the row out that matches that key, in order to get the ID... ensures that it was the right row... then you can delete the unique key. Justin on 18/09/02 10:27 PM, Jon Haworth ([EMAIL PROTECTED]) wrote: > Hi Bob

RE: [PHP] Auto-increment value

2002-09-18 Thread bob parker
653.19) Content-Type: text/plain; charset="ISO-8859-1" Subject: RE: [PHP] Auto-increment value X-UIDL: *ab"!\-5!!-$7!!nk~!! Hi Bob, > SELECT idno ORDER BY idno DESC LIMIT 1; > assuming idno is what gets auto increm

RE: [PHP] Auto-increment value

2002-09-18 Thread Jon Haworth
Hi Bob, > SELECT idno ORDER BY idno DESC LIMIT 1; > assuming idno is what gets auto incremented That's not the best idea - what happens if two users are inserting records into the table at nearly-but-not-quite the same time? 1. Insert A goes through 2. Insert B goes through 3. LastID A returns

Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer
You encounter a race condition bob parker wrote: >SELECT idno ORDER BY idno DESC LIMIT 1; >assuming idno is what gets auto incremented >bob > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Auto-increment value

2002-09-18 Thread bob parker
SELECT idno ORDER BY idno DESC LIMIT 1; assuming idno is what gets auto incremented bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
> There is a similar one for postgresql as well: pg_last_oid() . I tried that. It gives me 24807, instead of 5. Or is oid is a reference to something else, which would lead me to the '5' i'm looking for? -- snip snip -- if($result = pg_exec($db, $sql)) { $query = "success";

Re: [PHP] Auto-increment value

2002-09-18 Thread Leonid Mamtchenkov
Dear Faisal Abdullah, Once you wrote about "RE: [PHP] Auto-increment value": > Thanks for your reply, > but I'm using postgresql. > Mysql is irrelevant for me. There is a similar one for postgresql as well: pg_last_oid() . > -Original Message- > From:

RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
Thanks for your reply, but I'm using postgresql. Mysql is irrelevant for me. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 7:41 PM To: PHP Subject: Re: [PHP] Auto-increment value MySQL has |LAST_INSERT_ID() function, t

Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer
gt;-Original Message- >From: Faisal Abdullah [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, September 18, 2002 6:37 PM >To: PHP >Subject: RE: [PHP] Auto-increment value > > >I tried that. It gives me 24807, instead of 5. >Or is oid is a reference to something

RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
ther user/session does another insert/nextval(), before my select statement finishes processing? Would I get a 5? Sincerely, Faisal -Original Message- From: Faisal Abdullah [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 6:37 PM To: PHP Subject: RE: [PHP] Auto-increment val

RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
d($result); } -- snip snip -- Sincerely, Faisal -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 5:42 PM To: PHP Subject: Re: [PHP] Auto-increment value As he uses postgresql, he should use *pg_last_oid()* Scott Houseman wrot

Re: [PHP] Auto-increment value

2002-09-18 Thread Justin French
not on postgreSQL :) Justin on 18/09/02 7:24 PM, Scott Houseman ([EMAIL PROTECTED]) wrote: > Hi there. > > You can use the function mysql_insert_id( [link id] ). > > regards > > Scott > > Faisal Abdullah wrote: >> Hi people, >> >> I have a table with a column called ID (auto-increment). >

Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer
As he uses postgresql, he should use *pg_last_oid()* Scott Houseman wrote: > Hi there. > > You can use the function mysql_insert_id( [link id] ). > > regards > > Scott > > Faisal Abdullah wrote: > >> Hi people, >> >> I have a table with a column called ID (auto-increment). >> Is it possible to k

Re: [PHP] Auto-increment value

2002-09-18 Thread Erwin
Scott Houseman wrote: > Hi there. > > You can use the function mysql_insert_id( [link id] ). > >> I'm using postgresql. Not if you're using PostGreSQL Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Auto-increment value

2002-09-18 Thread Scott Houseman
Hi there. You can use the function mysql_insert_id( [link id] ). regards Scott Faisal Abdullah wrote: > Hi people, > > I have a table with a column called ID (auto-increment). > Is it possible to know the value of ID, right after inserting > a row? > > I'm using postgresql. > > Thanks. >

[PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah
Hi people, I have a table with a column called ID (auto-increment). Is it possible to know the value of ID, right after inserting a row? I'm using postgresql. Thanks. Sincerely, Faisal __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

RE: [PHP] Auto Increment Problems....

2002-07-29 Thread cteubner
-Original Message- >From: Georgie Casey [mailto:[EMAIL PROTECTED]] >Apart from this looking ugly, it poses another problem. In my PHP script >where I can add new rows, I query the table, checking how many rows in the >table altogether and set the new id as the next number, but this doesnt

[PHP] Auto Increment Problems....

2002-07-29 Thread Georgie Casey
rite, my primary key column ("id") is set to auto_increment as usual which is very handy. But when I delete a row, the auto_increment just keeps incrementing and there's this 'hole' left where I deleted the row! Apart from this looking ugly, it poses another problem. In my PHP script where I can

Re: [PHP] auto increment

2001-09-07 Thread Martín Marqués
On Vie 07 Sep 2001 19:01, [EMAIL PROTECTED] wrote: > you know how, if you make a field a primary key and have it auto > increment... then if you delete an entry and add a new one it makes the > field 2 instead of 1... i know thats explained bad but do you know what i > mean? is there a way to make

[PHP] auto increment

2001-09-07 Thread nate
you know how, if you make a field a primary key and have it auto increment... then if you delete an entry and add a new one it makes the field 2 instead of 1... i know thats explained bad but do you know what i mean? is there a way to make it go back to 1 as if there were never any fields enter