PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old September 5th, 2003, 01:38 PM
wvdploeg wvdploeg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 wvdploeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PEAR and autoincrement

When I have an autoincrement field in MySQL I know how to retrieve the new inserted value by using direct mysql calls, but is there also some way to retrieve the value of the autoincrement field when I use PEAR ????

Reply With Quote
  #2  
Old September 5th, 2003, 07:21 PM
sliver's Avatar
sliver sliver is offline
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 897 sliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 44 m 13 sec
Reputation Power: 2
Send a message via AIM to sliver Send a message via XFire to sliver
RE: PEAR and autoincrement

Try using $id=mysql_insert_id(); don't know if it'll work w/ pear though.

Reply With Quote
  #3  
Old September 5th, 2003, 07:58 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: PEAR and autoincrement

Pear uses sequences and does not rely on the database's auto_increment capability. See this page.

Reply With Quote
  #4  
Old September 6th, 2003, 08:26 AM
wvdploeg wvdploeg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 wvdploeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: RE: PEAR and autoincrement


Quote:
Pear uses sequences and does not rely on the database's auto_increment capability. See this page.


Eh... Guess it's some outdated link 'Error 404 - document not found
The requested document /manual/en/package.database.db.intro-sequences.php was not found in the PEAR manual.

Please go to the Table of Contents and try to find the desired chapter there.'

Reply With Quote
  #5  
Old September 6th, 2003, 08:28 AM
wvdploeg wvdploeg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 wvdploeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: PEAR and autoincrement

Oh... guess the page is not outdated but the PEAR/PHP sites have some general problem... on both the PEAR and the PHP site non of the documentation is accessable at the moment... I'll try to check it out later, thanks for the reply anyway.


Reply With Quote
  #6  
Old September 6th, 2003, 08:30 AM
wvdploeg wvdploeg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 wvdploeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: RE: PEAR and autoincrement


Quote:
Try using $id=mysql_insert_id(); don't know if it'll work w/ pear though.


It works, but I think it's no good practice to 'mix' abstracted (via PEAR) and non-abstracted calls to the database... The idea was that the application I'm writing could be portable to other databases too, which isn't if I use MySQL specific calls.
Thanks anyways for the reply

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > PEAR and autoincrement


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway