Re: [PHP] php/mysql object id question..

2005-09-15 Thread Oliver Grätz
Jasper Bryant-Greene schrieb: > Oliver Grätz wrote: > >>3. Yes. One can abuse exceptions to return something in a constructor. >> Just another argument against exceptions ;-) OK, it's unorthodox, >> if you absolutely need to do that, do it and tell nobody *g*. > > This is not "abusing" except

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Jasper Bryant-Greene
Oliver Grätz wrote: 3. Yes. One can abuse exceptions to return something in a constructor. Just another argument against exceptions ;-) OK, it's unorthodox, if you absolutely need to do that, do it and tell nobody *g*. This is not "abusing" exceptions. If you throw an exception then the

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Oliver Grätz
bruce schrieb: > but then, i'm starting to realize that there's probably a great deal of > 'opensource' code that's in use that hasn't been thoroughly vetted. 1. Constructors cannot explicitly return anything because they always return the new object. 2. OpenSource project and the code in them:

RE: [PHP] php/mysql object id question..

2005-09-14 Thread bruce
to forget!! -Original Message- From: Edward Vermillion [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 2:46 PM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] php/mysql object id question.. bruce wrote: > stephen, > > you're correct re

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Jasper Bryant-Greene
bruce wrote: in their constructor, they have the 'return false' arrggghh!!! a quick look at google, and it appears that you can't return any val from a constructor. in fact, the 'object id' that's being returned appears to simply be (as you stated) the instance of the class that was created... as

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Edward Vermillion
bruce wrote: stephen, you're correct regarding what's going on... i had taken some code used in phpBB, and blindly slammed it into my app to test out their db class... i had assumed that it worked guess what!!! in their constructor, they have the 'return false' arrggghh!!! a quick look at

RE: [PHP] php/mysql object id question..

2005-09-14 Thread bruce
Original Message- From: Stephen Leaf [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 1:51 PM To: php-general@lists.php.net Subject: Re: [PHP] php/mysql object id question.. On Wednesday 14 September 2005 03:42 pm, bruce wrote: > hi... > > i have the following psuedo

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Stephen Leaf
On Wednesday 14 September 2005 03:42 pm, bruce wrote: > hi... > > i have the following psuedo code... > > i'm showing the pertinent parts, and eliminating the rest... > > -- > class sql > { > >    function sql(...) >    { >       return false > >       mysql_

[PHP] php/mysql object id question..

2005-09-14 Thread bruce
hi... i have the following psuedo code... i'm showing the pertinent parts, and eliminating the rest... -- class sql { function sql(...) { return false mysql_ mysql_ } } $db = new sql(...) echo "db" = .$db; -