You are here: Re: Problem making a class extending another « All PHP « IT news, forums, messages
Re: Problem making a class extending another

Posted by Stefan Rybacki on 10/10/89 11:20

Peter wrote:
>>I'm not very familar with the pear packages. As I can see is query a
>>method of a class called DB. And since you derived your class of DB you
>>should simply call query() without anything before (e.g. parent or DB).
>>
>>Another thing that makes me stuck is that the error message tells you
>>something about a function called db() and I don't see such a function in
>>your code?!
>>
>>Regards
>>Stefan
>
>
> Sorry the error message should have been
>
> Fatal error: Call to undefined function: query() in
> /home/petermcd/public_html/the.php on line 25
>
> I have tried just calling it by the function name and this has the same
> result, I am presuming it is the way that it calls this function.
>
>
Ok after reading I found out that the query function is not a member of
the DB class.

Its member of the connection class. Use like this:

$conn = DB::connect ($dsn, $options);
$result = $conn->query ($query_str);


More information at:
http://www.kitebird.com/articles/peardb.html

May you ask aunt google from time to time ;)

Regards
Stefan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация