problems with nextId
| From: | Matt McDonald | Date: | Fri, 16 Aug 2002 16:03:42 +0000 |
| Subject: | problems with nextId | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2136@lists.php.net to get a copy of this message | ||
I'm having some problem understanding exactly how the nextID function works.
From pear.php:
<?php
...
$id = $db->nextId('mySequence');
// Use the ID in your INSERT query
$res = $db->query("INSERT INTO myTable (id,text) VALUES ($id,'foo')");
...
?>
First off, can you have multiple sequences for multiple tables? How do you
assign a sequence to a particluar table.
When I run $db->nextId('mySequence'); it returns an object, not an int, ans
I was hoping. I seem to be missing something (obvious?) here.
Matt