Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 02-03-2005, 04:23 AM   PM User | #1
Jalenack
Regular Coder

 
Join Date: May 2004
Location: Berkeley, California Age: 15
Posts: 398
Thanks: 0
Thanked 0 Times in 0 Posts
Jalenack is an unknown quantity at this point
Wordpress database error with 'unknown column'

mm...I've managed to work myself into a sticky situation.

I'm getting:
Quote:
Database error: [Unknown column 'language' in 'field list']
you can view the actual error at http://blog.jalenack.com

I am mysql illiterate and know some basic php. My host (dreamhost) is really confusing me with their mysql panel and all. Basically this one unknown table is breaking everything but my blog content..

I was updating my shortstat from v0.3b to v0.35 when it happened. The wordpress database is on a different database than the shortstat one (i'm pretty sure??). One thing about the new version of shortstat is they added a language module that displays what language is being used. Because i didn't care about it, i deleted the html that would display in my shortstat...Here's the php for the language section in the function.php file of shortstat
PHP Code:
function SI_getLanguage() {
    include_once(
"languages.php");
    global 
$SI_tables;
    
    
$query "SELECT COUNT(*) AS 'total' FROM $SI_tables[stats] WHERE language != '' AND language != 'empty'";
    if (
$result mysql_query($query)) {
        if (
$count mysql_fetch_array($result)) {
            
$th $count['total'];
            }
        }
    
$query "SELECT language, COUNT(language) AS 'total' 
              FROM $SI_tables[stats] 
              WHERE language != '' AND 
              language != 'empty' 
              GROUP BY language
              ORDER BY total DESC"
;
    if (
$result mysql_query($query)) {
        
$html  "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
        
$html .= "\t<tr><th>Language</th><th class=\"last\">%</th></tr>\n";
        while (
$r mysql_fetch_array($result)) {
            
$l $r['language'];
            
$lang = (isset($SI_languages[$l]))?$SI_languages[$l]:$l;
            
$per number_format(($r['total']/$th)*100);
            
$per = ($per)?$per:'<1';
            
$html .= "\t<tr><td>$lang</td><td class=\"last\">$per%</td></tr>\n";
            }
        
$html .= "</table>";
        }
    return 
$html;
    } 
could it be that the two databases are connected somehow or something...

So! For a solution, couldn't I write a php function that would delete the erroneus column in my database and restore everything? I haven't learned any mysql related php so I wouldn't know how to do it. I just don't want to mess up and then end up killing all my data stored. Please excuse my ignorance

I can't access my mysql tables directly for some weird reason. phpMyAdmin only displays my shortstat tables and nothing else.

I hope this is a simple fix...maybe i should contact tech support at Dreamhosts...thanks in advance! (I hope I was thorough enough )
__________________
Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
Pretty buttons does not a great website make.
Jalenack is offline   Reply With Quote
Old 02-06-2005, 01:28 AM   PM User | #2
Jalenack
Regular Coder

 
Join Date: May 2004
Location: Berkeley, California Age: 15
Posts: 398
Thanks: 0
Thanked 0 Times in 0 Posts
Jalenack is an unknown quantity at this point
whew...well today i figured out how to access my mysql tables and all..but i still haven't found the problem. Where or what is the 'field list'. it doesn't show up anywhere on the dump file. Any ideas?

Edit:
Everything is fixed....Shortstat was somehow inflitrating my blog, so i deleted the directory and am now starting from scratch
__________________
Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
Pretty buttons does not a great website make.

Last edited by Jalenack; 02-06-2005 at 02:58 AM..
Jalenack is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:37 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.