NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is two + one?

Go back

Topic review (newest first)

Waccoon
01-19-2011 21:14:33

You need to change the "mysql_" to "db_" so it's compatible with the new database layer.

Code:

if ($cfg['use_infractions'] == 'yes') {
    $infractions = db_query("SELECT * FROM {$db_mem}oekaki WHERE usrname = '$OekakiU'");
    $inf_read = db_fetch_array($infractions);
    $right_menu[] = $inf_read['infractions'] . ' infractions';
}

"db_mem" is a different length than "db_p", so it's easier to spot.  Previously, both database prefixes were the same length.

You can still use the old database prefixes, though, including the ancient "$OekakiPoteto_MemberPrefix".

Pinkie
01-19-2011 15:28:35

I tried to add the following into header.php:

Code:

if ($cfg['use_infractions'] == 'yes') {
    $infractions = mysql_query("SELECT * FROM {$db_mem}oekaki WHERE usrname = '$OekakiU'");
    $inf_read = mysql_fetch_array($infractions);
    $right_menu[] = $inf_read['infractions'] . ' infractions';
}

On the 2nd line of the code it throws out connection errors. I am wondering what I have done incorrectly?

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/pinkiepichu/oekakis.pichusworld.net/redline/header.php on line 214

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/pinkiepichu/oekakis.pichusworld.net/redline/header.php on line 214

Also, on a minor note, is there a reason why we are using {$dm_mem} as opposed to the previous variable? Just curious. wink

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB