Author |
Message |
webbi
Hangin' Around

Joined: Jun 21, 2008
Posts: 30
|
Posted:
Sun Jan 11, 2009 8:54 am |
|
Code:Fatal error: Call to undefined function: sql_query() in /*Edited by Admin*/themes/Klyde/theme.php on line 191
|
Line 191 reads as:
Code:
$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);
|
|
|
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Sun Jan 11, 2009 9:12 am |
|
It looks like the problem may be caused by the $dbi issue that has been discussed here.
It you do a search on $dbi you should find a post discussing how to fix this. |
|
|
|
 |
webbi

|
Posted:
Sun Jan 11, 2009 11:46 am |
|
Are you refering to this thread:
http://www.ravenphpscripts.com/posts16511-start-0.html ?? (cuz there are 172 hits regarding $dbi)
Note: after reading all this stuff... gesh; trying to wrap my head around what exactly I am suppose to alter here. Have no clue at this point. Our old style theme probably needs code updates, as does the block I am attempting to show on the right side. |
|
|
|
 |
jakec

|
Posted:
Sun Jan 11, 2009 12:06 pm |
|
|
|
 |
webbi

|
Posted:
Sun Jan 11, 2009 2:04 pm |
|
Okay, I did change the 4 $dbi statement & 1 query statement... did not change results. |
|
|
|
 |
jakec

|
Posted:
Sun Jan 11, 2009 2:05 pm |
|
Are you still getting any errors? |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Jan 11, 2009 7:16 pm |
|
webbi if those where inside functions, did you remember to change $dbi to $db in the global statement? |
|
|
|
 |
webbi

|
Posted:
Sun Jan 11, 2009 8:58 pm |
|
Quote: | Are you still getting any errors? |
Yes, same error as stated & still no right blocks.
Quote: | webbi if those where inside functions, did you remember to change $dbi to $db in the global statement? |
Ummm in the "global" function I did change the $dbi to $db; yes and removed others from statement ends. Still no go. I probably did something wrong - maybe I should just post the theme code here instead; not like its a trade secret or anything. |
|
|
|
 |
jakec

|
Posted:
Mon Jan 12, 2009 2:20 am |
|
Can you post the code here that you have changed, there's no need to post the whole theme code. |
|
|
|
 |
webbi

|
Posted:
Mon Jan 12, 2009 12:31 pm |
|
Code:// $result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);
$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
//while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
while(list($lid, $title, $hits) = sql_fetch_row($result)) {
|
|
|
|
|
 |
jakec

|
Posted:
Mon Jan 12, 2009 12:52 pm |
|
Ah, I think it shoud look more like this.
The first query should look like:
Code:$result = $db->sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
|
and second query should be:
Code:while(list($lid, $title, $hits) = $db->sql_fetchrow($result)
|
Were there any others? |
|
|
|
 |
webbi

|
Posted:
Mon Jan 12, 2009 3:03 pm |
|
Well... after really looking things over here. I see all kinds of query statements; trying hard to understand what they all mean.
The 2 I quoted above are from the "footer function".
This is from the "header function":
Code:
$uresult = $db->sql_query("select user_id from ".$user_prefix."_users where username='$username'");
list($uid) = $db->sql_fetchrow($uresult);
$presult = $db->sql_query("select * from ".$prefix."_bbprivmsgs where privmsgs_to_userid='$uid' AND (privmsgs_type='0' OR privmsgs_type='1' OR privmsgs_type='3' OR privmsgs_type='5')");
$pnumrow = $db->sql_numrows($presult);
|
|
|
|
|
 |
jakec

|
Posted:
Mon Jan 12, 2009 3:07 pm |
|
You'll need to do a search of the files for $dbi and change every query to suit.
If you stick to the rules on the above post I mentioned you should be OK.
I use Notepad++ to search multiple files at a time. |
|
|
|
 |
webbi

|
Posted:
Mon Jan 12, 2009 3:10 pm |
|
Just so you know, I made those 2 changes you mentioned there & the site crashed. So I restored the original code before I edited anything. This sin't going too well. |
|
|
|
 |
jakec

|
Posted:
Mon Jan 12, 2009 3:39 pm |
|
When it crashed did you get any errors? |
|
|
|
 |
webbi

|
Posted:
Mon Jan 12, 2009 3:45 pm |
|
Nope... no errors at all; white page. (and yes, error checking is still enabled in config)
Wouldn't it be easier to just give you the file? |
|
|
|
 |
jakec

|
Posted:
Mon Jan 12, 2009 3:53 pm |
|
PM me a link to the file and I will try and have a look, but it may take me a few days.
If there are any other Admins/Mods who are able to look at this sooner please speak now.  |
|
|
|
 |
webbi

|
Posted:
Fri Jan 30, 2009 11:20 am |
|
You manage to have any luck with that theme yet Jake? |
|
|
|
 |
jakec

|
Posted:
Fri Jan 30, 2009 11:24 am |
|
Apologies this totally slipped my mind. I will have a look this weekend and get back to you. |
|
|
|
 |
|