Jump to content

Kestrad

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by Kestrad

  1. I'm creating a php class, but I receive the following error: Wrong parameter count for mysql_fetch_assoc(). It tells me that the problem is in the constructor, which is as follows:

     

    function __construct($arg1 = 0){
        $q = mysql_fetch_assoc('getQuoteById', $arg1);
        $this->quote = $q['quote'];
    }
    

     

    getQuoteById is a sql query:

    SELECT id, quote FROM quote WHERE id=%d
    

     

    where id and quote are the two columns in the table quote. Could someone please explain to me what this error means? Thanks!

  2. Hey all! I'm getting an unexpected T_VARIABLE with the following function:

     

    function getHighestParentName($id = $this->cid){

        $cat = mysql_fetch_assoc(fsquery('getParentCategories', $id));

        if ($cat['pid']!=0){getHighestParentName($cat['id']);}

        return $cat['name'];

    }

     

    fsquery is a function defined in another file, which I know is correctly defined and correctly referenced. pid, id, and name are column names in a mysql table. Can someone please help me find what's wrong? Thanks!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.