I am running PHP5 on win2003, with apache2, sql server 2000.

Cake appears to be having an issue getting the identity value back from
sql server.

When I attempt to add a new record to a table I get this error:
===================
Notice: Undefined index: insertID in C:\Program Files\Apache
Group\Apache2\htdocs\cake\libs\model\dbo\dbo_mssql.php on line 502
==================

I modded dbo_mssql.php like this:
   $id = $this->fetchAll('SELECT SCOPE_IDENTITY() AS insertID', false);
   pr ($id);
   return $id[0]['insertID'];

and this is this $id array that comes back back from sql server:

======================
Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [insertID] => 5
                )

        )
)
======================


BUT, the cake dbo code is not looking far enough into the array:
     return $id[0]['insertID'];


Is it me or Sql server or something else??

thanks,

Pat.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to