On Tuesday 22 January 2002 22:35, Johannes Hiemer wrote:

First of all, please keep the discussion on the list!

> >What did you want it to do?
> I want it to do things like inserting into Mysql-dbs
> Fetching arrays. Just every Mysql-command which
> Is also suported in PHP.
> What is it doing now?
> It is doing nothing if I create a class of it.
> If I create a  class using the fetch_array function
> And echoing it after it just says: Object.
> What error does it give, if any?
> S. a.

Looking back at your code:

>  $test = new get_db();
>  $test -> connect();
>  $test -> db_query("SELECT * FROM topics");
>  $test -> fetch_array("SELECT * FROM topics");
>  echo "$test";

You should be using:


etc (note there are no spaces surrounding the "->").

BTW, I'm not trying to put you off, but why are you writing your own class of 
mysql db functions? There are already loads out there which are tested (and 
working!). If this is an exercise in learning how to write classes then good 
luck :)

Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

The perfect lover is one who turns into a pizza at 4:00 A.M.
                -- Charles Pierce

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to