| View previous topic :: View next topic |
| Author |
Message |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Sat Feb 17, 2007 9:25 pm Post subject: Why DB class put (&) before method name |
|
|
i am a new php programmer and i am trying to understand some php standard. I don't understand why did the DB class in PEAR put the & before some methods name.
another thing is it better for me to use DB class of MDB2 class in PEAR site there is some warning about using DB class |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 18, 2007 12:29 am Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | | i am a new php programmer and i am trying to understand some php standard. I don't understand why did the DB class in PEAR put the & before some methods name. |
http://www.php.net/manual/en/language.references.pass.php
| baselbj wrote: | | another thing is it better for me to use DB class of MDB2 class in PEAR site there is some warning about using DB class |
I don't see a question here.
The answer is: MDB2 is the successor of DB. If you don't have a good reason for using DB (which does not seem to be the case), your choice should be MDB2. It is also faster than MDB2 in most cases. |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Sun Feb 18, 2007 12:05 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| mark wrote: | | baselbj wrote: | | i am a new php programmer and i am trying to understand some php standard. I don't understand why did the DB class in PEAR put the & before some methods name. |
http://www.php.net/manual/en/language.references.pass.php
| baselbj wrote: | | another thing is it better for me to use DB class of MDB2 class in PEAR site there is some warning about using DB class |
I don't see a question here.
The answer is: MDB2 is the successor of DB. If you don't have a good reason for using DB (which does not seem to be the case), your choice should be MDB2. It is also faster than MDB2 in most cases. |
but in PEAR site when you enter the DB class page there is a warning that DB class is not well tested so it is better to use MDB2.
any way i will use the DB class
thank you for your help mark  |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 18, 2007 2:27 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | | but in PEAR site when you enter the DB class page there is a warning that DB class is not well tested so it is better to use MDB2. |
No, the warning tells you that DB was superseded by MDB2 and that you are encouraged to use MDB2. The DB package is still maintained, but only for bug fixes. New features will not be included in DB.
| baselbj wrote: | | any way i will use the DB class |
??? Is this a typo and you meant MDB2? Your sentence contradicts both what you said and what I said. |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Sun Feb 18, 2007 7:28 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| mark wrote: | | baselbj wrote: | | but in PEAR site when you enter the DB class page there is a warning that DB class is not well tested so it is better to use MDB2. |
No, the warning tells you that DB was superseded by MDB2 and that you are encouraged to use MDB2. The DB package is still maintained, but only for bug fixes. New features will not be included in DB.
| baselbj wrote: | | any way i will use the DB class |
??? Is this a typo and you meant MDB2? Your sentence contradicts both what you said and what I said. |
It wasn't a typo I think I missed understand you at the first time. what I understand is that DB is the new class, but when goes back to your replay I understand that is wrong.
So I will use the MDB2 class in my work.
thank you mark  |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 18, 2007 8:33 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | It wasn't a typo I think I missed understand you at the first time. what I understand is that DB is the new class, but when goes back to your replay I understand that is wrong. |
Ah, now I see that I made a mistake:
"It is also faster than MDB2 in most cases."
It actually wanted to write that MDB2 is faster than DB in most cases.
Sorry for the confusion. |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Sun Feb 18, 2007 8:45 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| mark wrote: | | baselbj wrote: | It wasn't a typo I think I missed understand you at the first time. what I understand is that DB is the new class, but when goes back to your replay I understand that is wrong. |
Ah, now I see that I made a mistake:
"It is also faster than MDB2 in most cases."
It actually wanted to write that MDB2 is faster than DB in most cases.
Sorry for the confusion. |
it is ok mark.
can you help me in that
I am thinking of using DB_DataObject for my project i love oo programing. in DB_DataObject every thing is object.
unfortunately DB_DataObject mainly supports the DB class and did not work perfectly with MDB2.
So is it good idea to use DB_DataObject or not ?
i am sorry mark i know i ask so much and my English is not perfect  |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 18, 2007 8:58 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | can you help me in that
I am thinking of using DB_DataObject for my project i love oo programing. in DB_DataObject every thing is object.
unfortunately DB_DataObject mainly supports the DB class and did not work perfectly with MDB2.
So is it good idea to use DB_DataObject or not ? |
<advertisement>DB_Table has a similar approach as DB_DataObject</advertisement>
I have no experience with DB_DO, but I know that it supports both DB and MDB2. And I know some people that use the combination of DB_DO with MDB2. Is "did not work perfectly" your own experience or did you read this somewhere?
| baselbj wrote: | i am sorry mark i know i ask so much and my English is not perfect  |
If your nickname indicates a city in Switzerland and your native language is German (which is also my native language), a better place for your questions might be pear-forum.de (some of the helpers there have very much DB_DO experience). |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Sun Feb 18, 2007 9:15 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| mark wrote: | | baselbj wrote: | can you help me in that
I am thinking of using DB_DataObject for my project i love oo programing. in DB_DataObject every thing is object.
unfortunately DB_DataObject mainly supports the DB class and did not work perfectly with MDB2.
So is it good idea to use DB_DataObject or not ? |
<advertisement>DB_Table has a similar approach as DB_DataObject</advertisement>
I have no experience with DB_DO, but I know that it supports both DB and MDB2. And I know some people that use the combination of DB_DO with MDB2. Is "did not work perfectly" your own experience or did you read this somewhere?
| baselbj wrote: | i am sorry mark i know i ask so much and my English is not perfect  |
If your nickname indicates a city in Switzerland and your native language is German (which is also my native language), a better place for your questions might be pear-forum.de (some of the helpers there have very much DB_DO experience). |
No I am not from Switzerland I am from Jordan small country in the Mideast I don't know if you know it ?
now about your Adz do you mean that DB_Table is better or more tested. Or you just want me to now that there is another option for me?
about why I think that DB_DO "did not work perfectly" , this can be found in the DB_DO example.ini file :
;db_driver = DB
; can be set to MDB or DB
; uses MDB backend rather than PEAR DB
; generator will probably not work!
; (EXPERIMENTAL) |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 18, 2007 9:35 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | | No I am not from Switzerland I am from Jordan small country in the Mideast I don't know if you know it ? |
No, not really. But it could have been possible that your nickname indicated that you are living in Basel.
| baselbj wrote: | | now about your Adz do you mean that DB_Table is better or more tested. Or you just want me to now that there is another option for me? |
Yes, only a pointer to an alternative (surrounded by the ad tag because I maintain DB_Table currently). Both packages have a very similar goal, while DB_DO is going more in the OO direction.
| baselbj wrote: | about why I think that DB_DO "did not work perfectly" , this can be found in the DB_DO example.ini file :
;db_driver = DB
; can be set to MDB or DB
; uses MDB backend rather than PEAR DB
; generator will probably not work!
; (EXPERIMENTAL) |
Okay, the generator is only one part of DB_DO and maybe the comment wasn't removed although MDB2 isn't experimental anymore. And I really think that DB_DO is ready to be used with MDB2, otherwise people wouldn't use the combination already. |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Mon Feb 19, 2007 9:50 am Post subject: Re: Why DB class put (&) before method name |
|
|
| Quote: |
No, not really. But it could have been possible that your nickname indicated that you are living in Basel. |
No it is my name. Jordan is a small country near Iraq I think you have to know both Iraq and Jordan because of the war.
| Quote: | | Yes, only a pointer to an alternative (surrounded by the ad tag because I maintain DB_Table currently). Both packages have a very similar goal, while DB_DO is going more in the OO direction. |
it is great to know one of PEAR developer I really loved the PEAR methodology. I think DB_DO is better for me as I Said before OO is great.
| Quote: | | Okay, the generator is only one part of DB_DO and maybe the comment wasn't removed although MDB2 isn't experimental anymore. And I really think that DB_DO is ready to be used with MDB2, otherwise people wouldn't use the combination already. |
Yesterday I tested DB_DO with MDB2 and it worked perfectly.
what I want know is a good and full documentation about the DB_DO, because the one on the site did not Expound how to use DB_DO with multi DB.
And Mark, can you give your email
Thank You Very much Mark  |
|
| Back to top |
|
 |
baselbj
Joined: 17 Feb 2007 Posts: 7
|
Posted: Mon Feb 19, 2007 9:52 am Post subject: Re: Why DB class put (&) before method name |
|
|
| Quote: |
No, not really. But it could have been possible that your nickname indicated that you are living in Basel. |
No it is my name. Jordan is a small country near Iraq I think you have to know both Iraq and Jordan because of the war.
| Quote: | | Yes, only a pointer to an alternative (surrounded by the ad tag because I maintain DB_Table currently). Both packages have a very similar goal, while DB_DO is going more in the OO direction. |
it is great to know one of PEAR developer I really loved the PEAR methodology. I think DB_DO is better for me as I Said before OO is great.
| Quote: | | Okay, the generator is only one part of DB_DO and maybe the comment wasn't removed although MDB2 isn't experimental anymore. And I really think that DB_DO is ready to be used with MDB2, otherwise people wouldn't use the combination already. |
Yesterday I tested DB_DO with MDB2 and it worked perfectly.
what I want know is a good and full documentation about the DB_DO, because the one on the site did not Expound how to use DB_DO with multi DB.
And Mark, can you give your email
Thank You Very much Mark  |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Mon Feb 19, 2007 1:59 pm Post subject: Re: Why DB class put (&) before method name |
|
|
| baselbj wrote: | | Jordan is a small country near Iraq I think you have to know both Iraq and Jordan because of the war. |
Ah, I was thinking of a city with that name. Of course, I know the country (but wasn't aware of the English name of it).
| baselbj wrote: | | what I want know is a good and full documentation about the DB_DO, because the one on the site did not Expound how to use DB_DO with multi DB. |
I don't know one, but Google might help you maybe.
| baselbj wrote: | And Mark, can you give your email  |
Just click on the "www" button below my post and then on "Imprint". You will find my email address there and also a contact form. |
|
| Back to top |
|
 |
|