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:
  #1  
Old September 5th, 2003, 02: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, 08:21 PM
sliver's Avatar
sliver sliver is offline
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 932 sliver User rank is Private First Class (20 - 50 Reputation Level)sliver User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 11 h
Reputation Power: 3
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, 08: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: 4
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, 09: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, 09: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, 09: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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek