Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Dati database

  1. #1

    Dati database

    Ragazzi ho un altro problema con il php il seguente codice
    Codice PHP:
                    if(strlen($user->getValue($field->getValue('usf_name_intern'))) > || $field->getValue('usf_type') == 'CHECKBOX')
                    {
                        echo 
    getFieldCode($field->getValue('usf_name_intern'), $user);
                    } 

    La funzione getFieldCode è
    Codice PHP:
    function getFieldCode($fieldNameIntern$User)
    {
        global 
    $gPreferences$g_root_path$gCurrentUser$gProfileFields$gL10n;
        
    $html      '';
        
    $value     '';
        
    $msg_image '';

        if(
    $gCurrentUser->editProfile($User->getValue('usr_id')) == false && $gProfileFields->getProperty($fieldNameIntern'usf_hidden') == 1)
        {
            return 
    '';
        }

        
    // get value of field in html format
        
    $value $User->getValue($fieldNameIntern'html');

        
    // if birthday then show age
        
    if($gProfileFields->getProperty($fieldNameIntern'usf_name_intern') == 'BIRTHDAY')
        {
            
    $birthday = new DateTimeExtended($User->getValue($fieldNameIntern$gPreferences['system_date']), $gPreferences['system_date'], 'date');
            
    $value $value'('$birthday->getAge(). ' '.$gL10n->get('PRO_YEARS').')';
        }

        
    // Icons der Messenger anzeigen
        
    if($gProfileFields->getProperty($fieldNameIntern'usf_name_intern') == 'ICQ')
        {
            if(
    strlen($User->getValue($fieldNameIntern)) > 0)
            {
                
    // Sonderzeichen aus der ICQ-Nummer entfernen (damit kommt [url]www.icq.com[/url] nicht zurecht)
                
    preg_match_all('/\d+/'$User->getValue($fieldNameIntern), $matches);
                
    $icq_number implode(""reset($matches));

                
    // ICQ Onlinestatus anzeigen
                
    $value '
                [url="http://www.icq.com/people/cmd.php?uin='
    .$icq_number.'&action=add">[img]http://status.icq.com/online.gif?icq='.$icq_number.'&img=5[/img]get('PRO_TO_ADD', $User->getValue($fieldNameIntern), $gProfileFields->getProperty($fieldNameIntern, 'usf_name')).'"]get('PRO_TO_ADD', $User->getValue($fieldNameIntern), $gProfileFields->getProperty($fieldNameIntern, 'usf_name')).'" />[/url'.$value;
            }
        }
        elseif($gProfileFields->getProperty($fieldNameIntern, '
    usf_name_intern') == 'SKYPE')
        {
            if(strlen($User->getValue($fieldNameIntern)) > 0)
            {
                // Skype Onlinestatus anzeigen
                $value = '
    <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
                [url="skype:'.$User->getValue($fieldNameIntern).'?add">[img]http://mystatus.skype.com/smallicon/'.$User->getValue($fieldNameIntern).'[/img]get('PRO_TO_ADD', $User->getValue($fieldNameIntern), $gProfileFields->getProperty($fieldNameIntern, 'usf_name')).'"]get('PRO_TO_ADD', $User->getValue($fieldNameIntern), $gProfileFields->getProperty($fieldNameIntern, 'usf_name')).'" />[/url] '.$value;
            }
        }
        elseif(strlen($gProfileFields->getProperty($fieldNameIntern, 'usf_icon')) > 0)
        {
            $value = $gProfileFields->getProperty($fieldNameIntern, 'usf_icon').''. $value;
        }

        // show html of field, if user has a value for that field or it's a checkbox field
        if(strlen($User->getValue($fieldNameIntern)) > 0 || $gProfileFields->getProperty($fieldNameIntern, 'usf_type') == 'CHECKBOX')
        {
            $html = '[*]
                        <dl>
                            <dt>'. $gProfileFields->getProperty($fieldNameIntern, 'usf_name'). ':</dt>
                            <dd>'. $value. '</dd>
                        </dl>
                    ';
        }

        return $html;

    mi visualizza tutti i dati presenti in una determinata tabella.
    A me servirebbe richiamare i singoli dati separatamente e non tutti insieme.

  2. #2
    Nessuno sa aiutarmi?

  3. #3
    Utente di HTML.it L'avatar di homerbit
    Registrato dal
    Dec 2005
    residenza
    Roma
    Messaggi
    1,380
    A me servirebbe richiamare i singoli dati separatamente e non tutti insieme.
    cioè?
    If you think your users are idiots, only idiots will use it. DropBox

  4. #4
    Allora quel codice con un richiamo mi mostra tutti i parametri della tabella.a me servirebbe che tipo con il parametro. "citta" mi mostrerebbe solo la citta o con il parametro "via" mi mostrerebbe solo la via

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.