Hallo Martin,

danke für Deine Antwort, jedoch bekomm ich es überhaupt nicht hin.
Ich bekomme bei mir grundsätzlich einen Fehler:
| debug |
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result 
resource in 
/home/sm-reptilien/htdocs.typo3/typo3conf/ext/mhreptiles/pi1/class.tx_mhreptiles_pi1.php
 on line 228

Kannst Du Dir das evtl. nochmal anschauen und sagen was ich verkehrt mache?

CODE:
case 'species':
  if(!count($this->DataSpecies)){
    $query = 'SELECT * FROM tx_mhreptiles_species WHERE AND 
pid='.intval($this->conf['pidList']).$this->cObj->enableFields('tx_mhreptiles_species').'
 AND uid='.$this->internal['currentRow']['uid'];
    $res = mysql(TYPO3_db, $query);
    while($row = mysql_fetch_assoc($res)){
      $this->Species[$row['uid']] = $row;
    }
  }
return $this->Species[$this->internal['currentRow']['species']]['species'];
break;

Grüße Marko

-------- Original Message --------
Subject: Re: [TYPO3-german] Extension und relationen der Tabellen (19-Apr-2007 
14:53)
From:    hard.one - mphanke <[EMAIL PROTECTED]>
To:      [email protected]

> Hi,
> 
> das wichtigste findest du in der getfieldcontent-Funktion. Da werden die 
> einzelnen Strings ausgeworfen.
> 
> Viel Spaß damit.
> 
> HTH
> 
> Martin
> 
> SOURCE :
> 
> function makelist($res)       {
>               $items=array();
>                       // Make list table rows
>               while($this->internal['currentRow'] = 
> $GLOBALS['TYPO3_DB']->sql_fetch_
> assoc($res))  {
>                       $items[]=$this->makeListItem();
>               }
>                       $out = '<div'.$this->pi_classParam('listrow').'>
>                       '.implode(chr(10),$items).'
>                       </div>';
>               return $out;
>       }
>               /**
>        * Implodes a single row from a database to a single line
>        *
>        * @return      Imploded column values
>        */
>       function makeListItem() {
>         $mailForm = '';
>               $data = array(
>                 "tx_pilmailform_pi1" => array(
>                         "tavUID" => $this->getFieldContent('uid'),
>                       ),
>               );
>                               $mailForm = 
> $this->pi_linkToPage($this->conf["mailformLabel"], $this->
> conf["mailformID"], '', $data);
>               $callbackForm = 
> $this->pi_linkToPage($this->conf["callbackLabel"], $this->
> conf["callbackID"], '', $data);
> 
>               
> $markerArray['###SALUTATION###']=$this->getFieldContent('salutation');
>               
> $markerArray['###LASTNAME###']=$this->getFieldContent('last_name');
>               
> $markerArray['###FIRSTNAME###']=$this->getFieldContent('first_name');
>               $markerArray['###POS###']=$this->getFieldContent('position');
>               $markerArray['###PHONE###']=$this->getFieldContent('fon');
>               $markerArray['###FAX###']=$this->getFieldContent('fax');
>               $markerArray['###EMAIL###']= $mailForm;
>               $markerArray['###CALLBACK###']= $callbackForm;
>               
> $markerArray['###DIVISION###']=$this->getFieldContent('division');
>               
> $markerArray['###SUBDIVISION###']=$this->getFieldContent('subdivision');
>               
> $markerArray['###LOCATION###']=$this->getFieldContent('location');
>               $markerArray['###IMAGE###']=$this->getFieldContent('image');
> //            
> $markerArray['###APPROACH###']=$this->getFieldContent('approach');
> 
>               $content = 
> $this->cObj->substituteMarkerArrayCached($this->templateCode,$
> markerArray);
>               $content.='<!-- ROW DATA -->';
>               return $content;
>       }
> 
> 
>       function getFieldContent($fN)   {
>               switch($fN) {
> /*                    case 'uid':
>                               return 
> $this->pi_list_linkSingle($this->internal['currentRow'][$fN],$
> this->internal['currentRow']['uid'],1); // The "1" means that the display 
> of single items is CACHED! Set to zero to disable caching.
>                       break;*/
>                       case 'salutation':
>                                        
> if(intval($this->internal['currentRow'][$fN]) == 0)
>                                          return 'Herr';
>                                        else   
> if(intval($this->internal['currentRow'][$fN]) == 1)
>                                          return 'Frau';
>                 break;
>                       case 'position':
>                                        if(!count($this->DataPosition)){
>                                          $query = 'SELECT * FROM 
> tx_hoemployees_position WHERE pid='.intval($
> this->conf['pidList']).$this->cObj->enableFields('tx_hoemployees_position');
> 
>                                                $res = mysql(TYPO3_db, $query);
>                                                                               
>                  while($row = mysql_fetch_assoc($res)){
>                                                                       
> $this->DataPosition[$row['uid']] = $row;
>                                                }
> 
>                                        }
>                                        return 
> $this->DataPosition[$this->internal['currentRow']['position']][
> 'position'];
>                       break;
>                       case 'subdivision':
>                                        if(!count($this->DataSubDivision)){
>                                          $query = 'SELECT * FROM 
> tx_hoemployees_subdivision WHERE pid='.
> intval($this->conf['pidList']).$this->cObj->enableFields('tx_hoemployees_
> subdivision');
>                                                $res = mysql(TYPO3_db, $query);
>                                                                               
>                  while($row = mysql_fetch_assoc($res)){
>                                                                       
> $this->DataSubDivision[$row['uid']] = $row;
>                                                }
> 
>                                        }
>                                        return 
> $this->DataSubDivision[$this->internal['currentRow']['
> subdivision']]['subdivision'];
>                       break;
>                       case 'division':
>                                        if(!count($this->DataDivision)){
>                                          $query = 'SELECT * FROM 
> tx_hoemployees_division WHERE pid='.intval($
> this->conf['pidList']).$this->cObj->enableFields('tx_hoemployees_division');
> 
>                                                $res = mysql(TYPO3_db, $query);
>                                                                               
>                  while($row = mysql_fetch_assoc($res)){
>                                                                       
> $this->DataDivision[$row['uid']] = $row;
>                                                }
>                                        }
>                                        return 
> $this->DataDivision[$this->internal['currentRow']['division']]
> ['division'];
>                       break;
>                       case 'location':
>                                        if(!count($this->DataLocation)){
>                                          $query = 'SELECT * FROM 
> tx_hoemployees_city WHERE pid='.intval($
> this->conf['pidList']).$this->cObj->enableFields('tx_hoemployees_city');
>                                                                               
>                  $res = mysql(TYPO3_db, $query);
>                                                                               
>                  while($row = mysql_fetch_assoc($res)){
>                                                                       
> $this->DataLocation[$row['uid']] = $row;
>                                                }
>                                        }
>                                        return 
> $this->DataLocation[$this->internal['currentRow']['location']][
> 'city'];
>                       break;
>                       case 'image':
>                               if($this->internal['currentRow'][$fN] != null)
>                               {
>                                       return '<img 
> src="/uploads/'.$this->prefixId.'/'.$this->internal['
> currentRow'][$fN].'" width="80" height="80">';
>                               }
>                               else
>                                       return '';
>                       break;
>                       default:
>                               return $this->internal['currentRow'][$fN];
>                       break;
>               }
>       }
> _______________________________________________
> TYPO3-german mailing list
> [email protected]
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german


_______________________________________________
TYPO3-german mailing list
[email protected]
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an