• Welcome to Simple Machines Community Forum. Please login or sign up.
September 18, 2021, 01:00:20 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


After SSI.php has been loaded, how do I make a db query?

Started by spearfish, August 18, 2008, 09:47:36 AM

Previous topic - Next topic

spearfish

My site uses heavy forum integration, and I'm letting SMF handle it so I don't have to deal with recreating the users table etc.

So once I load up SSI.php, how do I make a db query?  I know SMF connected, so I'd rather not do the same myself (especially since my host measures usage, and counts one connection as equal to 25 queries).

I'm used to doing it like this: (pardon my syntax, I haven't done this for a month or so)

$query = mysql_query("select * from table where condition == 'something');
$array = mysql_fetch_array($query)

mysql_query("update table set 'something' = 'something else' where condition = 'doughnut);
mysql_query("delete from table where something = 'pizza');


but since SMF goes across all sorts of databases, what do I do?  Thanks :-)

spearfish

August 18, 2008, 10:37:36 AM #1 Last Edit: August 18, 2008, 10:47:15 AM by spearfish
And then... how do I load custom values?  For example, there's another field called "gold" in the user table which I added... how do I load that up into the $user_info array?

Solved by modifying load.php.

Advertisement: