Unknown column 'a.realname' in 'field list'

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
oxygenws
Regular
Posts: 148
Joined: Thu Jan 20, 2005 11:20 am
Location: Iran
Contact:

Unknown column 'a.realname' in 'field list'

Post by oxygenws »

i upgrade my blog from 0.8-alpha11 to 8-beta2 and get the following error:
Query failed:

SELECT
ep_sticky.value AS orderkey,

e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.author,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.email

, e.body, e.extended

FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
LEFT OUTER JOIN serendipity_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
LEFT JOIN serendipity_entryproperties ep_sticky
ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky')
WHERE isdraft = 'false' AND e.timestamp <= '1110539863' AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1))
GROUP BY e.id
ORDER BY orderkey DESC, timestamp DESC
LIMIT 15

/ Unknown column 'a.realname' in 'field list'
its here -> http://oxygenws.com/blog/
My Blog, powered by s9y is http://oxygenws.com/blog/
oxygenws
Regular
Posts: 148
Joined: Thu Jan 20, 2005 11:20 am
Location: Iran
Contact:

Post by oxygenws »

sorry to ask before search :oops:

the solution is:
In your case you should upgrade to the latest -beta1 release. You may need to at the 'realname' column manually to your SQL tables. In MySQL you can create that via:

Code: Select all

ALTER TABLE serendipity_authors ADD realname VARCHAR(255) NOT NULL FIRST;
UPDATE serendipity_authors SET realname = username;
My Blog, powered by s9y is http://oxygenws.com/blog/
Valinor

Post by Valinor »

I'm still getting the error.

Code: Select all

Query failed:

SELECT 
                    

                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.author,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,

                    a.realname AS author,
                    a.email

                    , e.body, e.extended
                    
                FROM
                    serendipity_entries AS e
                    LEFT JOIN serendipity_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN serendipity_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN serendipity_category c
                        ON ec.categoryid = c.categoryid
                    
                    WHERE isdraft = 'false' AND e.timestamp <= '1110857540'
                    GROUP BY e.id
                    ORDER BY timestamp DESC
                     LIMIT 15

/ Unknown column 'a.realname' in 'field list'
oxygenws
Regular
Posts: 148
Joined: Thu Jan 20, 2005 11:20 am
Location: Iran
Contact:

Post by oxygenws »

did you run the following code for your bank?

Code: Select all

ALTER TABLE serendipity_authors ADD realname VARCHAR(255) NOT NULL FIRST;
UPDATE serendipity_authors SET realname = username;
My Blog, powered by s9y is http://oxygenws.com/blog/
Valinor

Post by Valinor »

yes, I added that code.

http://www.autumn-rain.net[/code]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

But it seems your query failed? Did you execute it via phpmyadmin?

An easier solution would be to edit your serendipity_config_local.inc.php file. Set the $serendipity['versionInstalled'] to '0.8-alpha10' and save the file. Then go to your blog. It will execute the right SQL queries once again, they can be executed twice without any real problems.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Valinor

Post by Valinor »

I updated to beta4 and it still has the problems. How do I edit serendipity_config_local.inc.php?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Valinor, please use an Editor and download the file via FTP, SSH, SFTP, SCP or other web interface means. Then edit the file (use Notepad, UltraEdit, Komodo or something other) and upload it again.

Or use phpMyAdmin to execute this SQL query on your serendipity DB:

ALTER TABLE {PREFIX}authors ADD realname VARCHAR( 255 ) NOT NULL FIRST;
UPDATE {PREFIX}authors SET realname = username;

replace {PREFIX} with the name of your DBPrefix, usually 'serendipity_'.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Valinor

Post by Valinor »

Roger. Downloaded and installed PhpMyAdmin. Worked like a charm. Thanks for the quick response.
Post Reply