NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR::DB->nextID problems

Daniel Convissor danielc at analysisandsolutions.com
Mon Aug 2 22:02:58 EDT 2004


Hi Mitch:

On Mon, Aug 02, 2004 at 09:34:44PM -0400, Mitch Pirtle wrote:
> 
> Congrats for making it to the International PHP Conference final 40!

Thanks!  I'm looking forward to the trip and meeting many of the 
people I just know via email and IRC.


> Here is the function that does the update, and should be easy to 
> understand:

Before I get into testing things out, did you create the sequence 
manually somewhere else using createSequence()?  If so, are you using 
the same exact name, including your unnecessarily appending "_seq" to 
the name as you are here:

>        $id = $this->db->nextId( 'content_archives_id_seq' );

Similarly, do all calls to nextID() use the same exact name?  You see, 
"_seq" is automatically appended to any name you pass to any of the 
sequence methods.  So, if you call it with "_seq" the name will be 
"_seq_seq".

If neither of those situations are the problem, please be so kind as 
to send along a self contained test script that both creates and drops 
the test table plus passes values into the query.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list