Page 1 of 1

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

Posted: Fri Mar 11, 2005 12:19 pm
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/

Posted: Fri Mar 11, 2005 12:30 pm
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;

Posted: Tue Mar 15, 2005 4:35 am
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'

Posted: Tue Mar 15, 2005 9:35 am
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;

Posted: Wed Mar 16, 2005 6:47 pm
by Valinor
yes, I added that code.

http://www.autumn-rain.net[/code]

Posted: Thu Mar 17, 2005 11:29 am
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

Posted: Sun Mar 27, 2005 8:54 pm
by Valinor
I updated to beta4 and it still has the problems. How do I edit serendipity_config_local.inc.php?

Posted: Sun Mar 27, 2005 10:37 pm
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

Posted: Sun Mar 27, 2005 10:40 pm
by Valinor
Roger. Downloaded and installed PhpMyAdmin. Worked like a charm. Thanks for the quick response.