This is a translated page. The original can be found here: http://iwebdevel.com/2009/07/20/codinghow-to-fetch-user-profile-data-with-ssi-php-from-a-smf-forum-database/
UPDATES VIA RSS | Email Оновлення через RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Головна / кодування / MySQL / PHP / кодування: Як витягти користувачів Pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Кодування: Як витягти профілю користувача SSI.php з даними з бази даних форумом SMF

Posted on 20. Опублікований 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Липень, 2009 Dragos в кодування, MySQL, PHP

Even though SMF offers a way to integrate their forum into any website, they do not provide enough information on how to do some basic tasks, eg fetching a member's profile details from the database. Хоча SMF пропонує спосіб інтегрувати їх форуму в будь-який веб-сайт, вони не дають достатньої інформації про те, як роблять деякі основні завдання, наприклад, вибірка профіль подробиці з бази даних. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. На щастя, Netbeans має дуже корисну функцію, навігатор по коду, який показує миттєвий перегляд всіх функцій, доступних у відкритих файлів. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Тому знайти функцію, яка робить нашу роботу було досить легко (хоча я не можу знайти його на веб-сайті SMF є).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. В усякому разі, для вибірки даних з бази РВСН, за допомогою функцій РВСН, ми повинні включати SSI.php на нашому сайті.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'путь / к / Вашому / Форум / SSI.php'); / / замінити путь / к / Вашому / Форуму свій шлях на форумі SMF 
 $userData=ssi_fetchMember(1,''); //ssi_fetchMember() takes two parameters: first: the member id as an integer or more than one id passed in an array; second parameter: output method as string: 'echo' or ''; $ UserData = ssi_fetchMember (1 ,''); / / ssi_fetchMember () приймає два параметри: по-перше: член ID як ціле або більш ніж один ідентифікатор пройшов у масиві; другий параметр: метод виведення у вигляді рядки: "Ехо" або ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ UserData); / / виводимо масив, що містить профіль користувача дані 
Translate this post Перекласти цю посаду


Related posts: Схожі повідомлення:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP помилка: Виклик функції-члена FETCH_ASSOC () на не-об'єкт у

    blog comments powered by Disqus Блог коментарі сила Disqus