hacker Posted July 22, 2011 Share Posted July 22, 2011 Can someone please explain why the function mysqli_stmt_insert_id(), used in chapter 17, is currently not documented in the PHP Manual? Thank you, Hacker Link to comment Share on other sites More sharing options...
HartleySan Posted July 22, 2011 Share Posted July 22, 2011 Well, there is the following, although admittedly sparse: http://php.net/manual/en/mysqli-stmt.insert-id.php Perhaps the documentation is limited because the function is so straightforward. I really don't know. Good question though. Hopefully Larry will chime in, as he's the one who wrote it. Link to comment Share on other sites More sharing options...
Larry Posted July 22, 2011 Share Posted July 22, 2011 For some reason, all of the MySQL Improved functions are hard to find in the PHP manual from a procedural standpoint. I think it has to do with the functions being available in both OOP and procedural approaches. So the function is documented, it just takes some effort to find it. Link to comment Share on other sites More sharing options...
Paul Swanson Posted July 22, 2011 Share Posted July 22, 2011 If you go to the Database Extensions page in the PHP Manual, you'll find the Mysqli extensions are the next item down from MySQL.The Mysqli functions are listed by the OOP syntax, but if you view the OOP page you'll also get the procedural syntax. But personally, I usually just type the function name in the 'search for' box at the top of the page. Link to comment Share on other sites More sharing options...
hacker Posted July 23, 2011 Author Share Posted July 23, 2011 Here's all I was able to find with a very confusing USER CONTRIBUTED NOTE: http://www.php.net/manual/en/mysqli-stmt.insert-id.php Also, what is the significance of the :: notation; i.e., mysqli_stmt::insert_id? My concern is this function's level of support. Hacker Link to comment Share on other sites More sharing options...
Larry Posted July 25, 2011 Share Posted July 25, 2011 You don't need to worry about this function's level of support. It's been available for years and will continue to be. The MySQLi_STMT::insert_id() reference just means that the insert_id() method is part of the MySQLi_STMT class. Link to comment Share on other sites More sharing options...
hacker Posted July 29, 2011 Author Share Posted July 29, 2011 Thank you Larry. So, MySQLi_STMT::insert_id() and mysqli_stmt_insert_id() are interchangeable and case insensitive? Thanks again, Hacker Link to comment Share on other sites More sharing options...
Stuart Posted July 29, 2011 Share Posted July 29, 2011 Well they're the same 'function' (do the same job) but one's the object orientated method and they second is the procedural function - it's just a paradigm thing. Link to comment Share on other sites More sharing options...
Recommended Posts