Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: simon79 on 24 March 2011, 17:30:21

Title: error PhP
Post by: simon79 on 24 March 2011, 17:30:21
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
Title: Re: error PhP
Post by: dario on 24 March 2011, 18:19:10
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
Title: Re: error PhP
Post by: simon79 on 24 March 2011, 18:29:55
ok. Sorry and thank's