Robert Rodgers
|
| Posted: 01/30/2003, 3:24 PM |
|
Hi all,
I have the code below in the on_click event for a button. Seems to work
ok. My question is when I New() an object do I need to dispose, destroy or
set = nothing ? In asp we clean up our objects. I haven't found any
information on disposing of objects in php?
Thanks
rob
$ds = new clsDBwsbdc();
$sSQL = "SELECT * From wsdbcSysGen Where SysID = 1";
$ds->query($sSQL);
$ds->next_record();
$SystemEmailAddress = CCGetValue($ds, "SystemEmailAddress");
mail ( "smith@sylvancomputing.com", "Password", "BODY: " .
$SystemEmailAddress);
|
|
|
 |
Sixto Luis Santos
|
| Posted: 01/31/2003, 6:18 AM |
|
Hello Rob,
It is always a good practice to clean after yourself, even in PHP. To
destroy the object and release the memory use unset:
unset($ds);
Regards,
Sixto
"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:b1cc79$r9k$1@news.codecharge.com...
> Hi all,
>
> I have the code below in the on_click event for a button. Seems to work
> ok. My question is when I New() an object do I need to dispose, destroy
or
> set = nothing ? In asp we clean up our objects. I haven't found any
> information on disposing of objects in php?
>
> Thanks
> rob
>
>
>
>
> $ds = new clsDBwsbdc();
> $sSQL = "SELECT * From wsdbcSysGen Where SysID = 1";
> $ds->query($sSQL);
> $ds->next_record();
> $SystemEmailAddress = CCGetValue($ds, "SystemEmailAddress");
> mail ( "smith@sylvancomputing.com", "Password", "BODY: " .
> $SystemEmailAddress);
>
>
>
|
|
|
 |
Robert Rodgers
|
| Posted: 01/31/2003, 7:06 AM |
|
Hi Sixto,
Many thanks. I have been looking at www.php.net but did not find info on
handling the clean up of objects. Do you have a better site for a php
beginner?
Thanks again.
rob
"Sixto Luis Santos" <ccs@tecnoapoyo.com> wrote in message
news:b1e0ji$8ek$1@news.codecharge.com...
> Hello Rob,
>
> It is always a good practice to clean after yourself, even in PHP. To
> destroy the object and release the memory use unset:
>
> unset($ds);
>
> Regards,
>
> Sixto
>
> "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
>news:b1cc79$r9k$1@news.codecharge.com...
> > Hi all,
> >
> > I have the code below in the on_click event for a button. Seems to
work
> > ok. My question is when I New() an object do I need to dispose, destroy
> or
> > set = nothing ? In asp we clean up our objects. I haven't found any
> > information on disposing of objects in php?
> >
> > Thanks
> > rob
> >
> >
> >
> >
> > $ds = new clsDBwsbdc();
> > $sSQL = "SELECT * From wsdbcSysGen Where SysID = 1";
> > $ds->query($sSQL);
> > $ds->next_record();
> > $SystemEmailAddress = CCGetValue($ds, "SystemEmailAddress");
> > mail ( "smith@sylvancomputing.com", "Password", "BODY: " .
> > $SystemEmailAddress);
> >
> >
> >
>
>
|
|
|
 |
Sixto Luis Santos
|
| Posted: 01/31/2003, 7:24 PM |
|
Hi Rob,
Try http://www.phpbuilder.com/
Regards,
Sixto
"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:b1e3e4$e17$1@news.codecharge.com...
> Hi Sixto,
>
> Many thanks. I have been looking at www.php.net but did not find info on
> handling the clean up of objects. Do you have a better site for a php
> beginner?
>
> Thanks again.
>
> rob
> "Sixto Luis Santos" <
ccs@tecnoapoyo.zl6wroteinmessagenewsb1e0ji$8ek$1@news.codecharge.zl6...Hello
Rob,Itisalwaysagoodpracticetocleanafteryourself,eveninPHP.Todestroytheobject
andreleasethememoryuseunsetunset$ds;
> >
> > Regards,
> >
> > Sixto
> >
> > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> >news:b1cc79$r9k$1@news.codecharge.com...
> > > Hi all,
> > >
> > > I have the code below in the on_click event for a button. Seems to
> work
> > > ok. My question is when I New() an object do I need to dispose,
destroy
> > or
> > > set = nothing ? In asp we clean up our objects. I haven't found
any
> > > information on disposing of objects in php?
> > >
> > > Thanks
> > > rob
> > >
> > >
> > >
> > >
> > > $ds = new clsDBwsbdc();
> > > $sSQL = "SELECT * From wsdbcSysGen Where SysID = 1";
> > > $ds->query($sSQL);
> > > $ds->next_record();
> > > $SystemEmailAddress = CCGetValue($ds, "SystemEmailAddress");
> > > mail ( "smith@sylvancomputing.com", "Password", "BODY: " .
> > > $SystemEmailAddress);
> > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
Robert Rodgers
|
| Posted: 02/01/2003, 5:13 AM |
|
Hi Sixto,
Thanks. I have now bookmarked it.
Rob
"Sixto Luis Santos" <ccs@tecnoapoyo.com> wrote in message
news:b1felt$152$1@news.codecharge.com...
> Hi Rob,
>
> Try http://www.phpbuilder.com/
>
> Regards,
>
> Sixto
>
> "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
>news:b1e3e4$e17$1@news.codecharge.com...
> > Hi Sixto,
> >
> > Many thanks. I have been looking at www.php.net but did not find info
on
> > handling the clean up of objects. Do you have a better site for a php
> > beginner?
> >
> > Thanks again.
> >
> > rob
> > "Sixto Luis Santos" <
>
ccs@tecnoapoyo.zl6wroteinmessagenewsb1e0ji$8ek$1@news.codecharge.zl6...Hello
>
Rob,Itisalwaysagoodpracticetocleanafteryourself,eveninPHP.Todestroytheobject
> andreleasethememoryuseunsetunset$ds;
> > >
> > > Regards,
> > >
> > > Sixto
> > >
> > > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> > >news:b1cc79$r9k$1@news.codecharge.com...
> > > > Hi all,
> > > >
> > > > I have the code below in the on_click event for a button. Seems to
> > work
> > > > ok. My question is when I New() an object do I need to dispose,
> destroy
> > > or
> > > > set = nothing ? In asp we clean up our objects. I haven't found
> any
> > > > information on disposing of objects in php?
> > > >
> > > > Thanks
> > > > rob
> > > >
> > > >
> > > >
> > > >
> > > > $ds = new clsDBwsbdc();
> > > > $sSQL = "SELECT * From wsdbcSysGen Where SysID = 1";
> > > > $ds->query($sSQL);
> > > > $ds->next_record();
> > > > $SystemEmailAddress = CCGetValue($ds, "SystemEmailAddress");
> > > > mail ( "smith@sylvancomputing.com", "Password", "BODY: " .
> > > > $SystemEmailAddress);
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
|