RE: Class ADODB - Method GenID() in MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
>   I am using the ADODB class to connect to a MySQL server. I am trying
> to generate an ID with the method GenID(), but when I tried this:
> 
>   $id = $db->GenID('table');
> 
>   The value of $id is equal to zero. I know that MySQL doesn't use
> sequences like PostgreSQL does (I've used this code in a PostgreSQL
> project), but in the documentation of ADODB I saw that it is possible
> to use it. Is there any trick about how to make it work?

>From the ADOdb Manual:   "GenID() will automatically create the sequence
for you if it does not exist (provided the userid has permission to do
so)."

Does the MySQL user have permission to create tables?  Since ADOdb fakes
sequences by creating a table, that could be a problem.

Brady

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux