SMF Query - Getting Data From Database

Smf Query Data Database - Computer Issues, Video Gaming - Posted: 26th Oct, 2019 - 1:38am

Register Login Text RPG Play Text RPG ?

Posts: 1 - Views: 94 Rating: 0/10 out of 0 Votes
Add Reply QReply
smf discussion Simple Machines Forums Software
Post Date: 26th Oct, 2019 - 1:38am / Post ID: #

Admin + Architect
[?] CPosts: 38,158
Posts: 48,367
Avg: 7.7 Post(s) / Day
Activity: 100%
[+] Gain: 4,607.54 FP
Charm: 346

SMF Query - Getting Data From Database

Sometimes you may need to insert your own code and / or retrieve info from SMF's DB. To do this you would do something like this:

Attached Image CODE

$result = $amFunc['db_query']('
SELECT m.id_comment,m.id_media,m.id_member, mem.id_member, mem.member_name
FROM {db_prefix}aeva_comments as m
LEFT JOIN {db_prefix}members AS mem ON (Mem.id_member = m.id_member)
WHERE m.id_comment ='.$theid.'',

'id_member' => 'id_member',
'member_name' => 'mem.member_name',
$row = $amFunc['db_fetch_assoc']($result);

$idmember = $row['id_member'];
$memname = $row['member_name'];


In this code, I am finding the last commentator's I'd from a defunct mod called "Aeva" and thus return his / her's name from the Membership table. I can then use $memname to display it.

Post Date: 20 November 2019 / Post ID: #

SMF Query - Getting Data From Database

, the Topic: "SMF Query - Getting Data From Database", needs your Reply. Be first to Comment to this Topic in the Computer Issues & Video Gaming Board! You will then have 1 Posts and 1 Core Posts! International Comment Add Comment now or scroll down for [Fast Reply] box.

Sponsored Links:

Options Fast Reply Add Reply Add Poll

No Registration Required!

We welcome input from visitors:
Add Comment As A Guest
Guest, please be considerate by using the appropriate tags as well as checking your grammar before submitting or it will be deleted. See: Constructive Posting Policy.

Tip TIP: Press above button ONCE only. If you come back here via the [Back] button on your browser then you will need to click [More Options] button (below) first in order to re-enable your ability to Post.

> TOPIC: SMF Query - Getting Data From Database

Donate Compare Membership
International Discussions Coded by: BGID® ALL RIGHTS RESERVED Copyright © 1999-2019
Disclaimer Privacy Report Errors Credits
This site uses Cookies to dispense or record information with regards to your visit. By continuing to use this site you agree to the terms outlined in our Cookies used here: Privacy / Disclaimer,

Latest Topics

Key: Background for Upgraded Members
Updated every 5 minutes See More

Latest Member Intro

Newest Members

Updated every: 31 minutes

Latest Photos

Healthy Vegan Breakfast
Healthy Vegan Breakfast
Uploaded by: JB
Rated: 0/10 + 2 comments
Last comment: JB 29th Apr, 2019 - 3:58am
▲ Rate Photo! ▲ Add Pic
Severn Bridge Half Marathon
Rate My Pic!
Jonah And Seth Halloween 2018
Rate My Pic!
Kntoran With Hair
Rate My Pic!
Myself At 18 Years
Rate My Pic!
Kntoran's Vacation Photos
Rate My Pic!
Zeus, My Cat
Rate My Pic!
Rate My Pic!
Me In The Blue Mountains.
Rate My Pic!

Updated every: 55 minutes