Handy SQL queries to get SMF information.

Started by kbox, January 26, 2006, 05:07:58 PM

Previous topic - Next topic

kbox

Hello.

I am trying to make an "information page"for my SMF forum, and i am using this opportunity to start learning SQL.

I was wondering if someone could help me out by providing the SQL queries for certain things.

I need..

  • The SQL query to get the newest member
  • The SQL query to get the last thread started
  • The SQL query to get the last post title
  • The SQL query to get users online
  • The SQL query to get total topics
  • The SQL query to get total posts
  • The SQL query to get number of members

It would do me a great favour if someone could provide these for me.

H

The SQL query to get users online

and possibly "The SQL query to get the newest member"

through the SMF SSI.

Dont know about the others
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

kbox

I only found out about the ssi.php today. awesome feature.
Im trying to use the function in that now.

The trouble im having is the strings have html in them, like for links to threads and profiles.
How would i strip all html from the strings?

I tried
<?php
require("../SSI.php");

$nm ssi_latestMember();
$newestmember strip_tags($nm);

echo 
$newestmember;
?>


But it dosnt effect whats displayed at all..

H

You would need to look at the function in SSI.php

Cant really help you with that as I am no good with coding!

I would recomend you copy the whole function from SSI.php and then paste it into your script (but leave the SSI include in place). This means you can update your forum easily.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Advertisement: