error PhP

Started by simon79, 24 March 2011, 17:30:21

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

simon79

I installed the Alexandria Library component on my joomla version 1.15.22.
For now, I have not encountered any trouble except that it:

When I create a menu "author search" I have several error messages that appears when I click on this link on my site:

Below I have my breadcrumb:

Warning: Invalid argument Supplied for foreach () in / mysite / components / com_abook / models / author.php on line 129

Warning: mysql_num_rows (): Supplied argument is Not a valid MySQL result resource in / mysite / libraries / joomla / database / database / mysql.php on line 344

Apparently it comes from a MySQL problem, but can put knowledge in php, I come to ask for help.

And the presentation of the "Author" I have the error message:

Warning: Invalid argument Supplied for foreach () in / mysite / components / com_abook / views / author / tmpl / default.php on line 88

Mon site

PHP Version: 5.2.17
Hosting: 1 & 1

Thank you in advance for your help


The first message : Warning: Invalid argument supplied for foreach() in /homepages/monsite/components/com_abook/models/author.php on line 129

Line 120 à 135 :
function getData()
   {
      // Lets load the data if it doesn't already exist
      if (empty( $this->_data ))
      {
                          $query = $this->_buildQuery();
                          $this->_data = $this->_getList( $query, $this->getState('limitstart'), $this->getState('limit') );
                   }
         $k=0;
         foreach($this->_data as $libro){
            $this->_authorname($libro->id);
            $this->_data[$k]->authors=$this->_authorname;
            $k=$k+1;
         }
      return $this->_data;
   }


The second message : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /monsite/libraries/joomla/database/database/mysql.php on line 344

Line 342 à 345 :
   function getNumRows( $cur=null )
   {
      return mysql_num_rows( $cur ? $cur : $this->_cursor );
   }

The third message d'erreur : Warning: Invalid argument supplied for foreach() in /monsite/components/com_abook/views/author/tmpl/default.php on line 88

Line 81 à 93 :
        <?php
   $params = &JComponentHelper::getParams( 'com_abook' );
   $imgpath=$params->get( 'img_path' );
        $k = 0;
        $i = 0;
        $n = count( $this->items );
        $rows = &$this->items;
        foreach ($rows as $row) {
                $link           = JRoute::_( 'index.php?option=com_abook&view=book&catid='.$row->catslug.'&id='. $row->slug );
                ?>
                <tr class="sectiontableentry<?php echo $k+1; ?><?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
         <td width="100" height="100">
         <?php

Help me please

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

dario

simon79, you have already opened a 3d about this problem, please don't try to open other. i cannot answer to your help request and unfortunately Federica is very busy. This forum is managed by people that don't gain money. When Federica will be free, her will be happy to help you.
thanks
[url=http://www.knoppix.it]Knoppix italia[/url]
[url=http://www.disconnessi.org]Stacca la spina![/url]
[url=http://www.informatizzati.org]Informatizzati.org: Computer, Linux, Windows, VMware[/url]

simon79

ok. Sorry and thank's