Query failed

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 7:59 pm
Contact:

Query failed

Post by Xanthouos » Fri Nov 05, 2010 9:15 pm

Hello,

It's been awhile since I've had issues with my favorite online app :-)

I think the "client" meddled with the ftp/files or something, and broke the site.

I changed mysql PW, and uploaded the newest release.

Went through the upgrade processes, and in the end had this error:
We detected some errors while running some diagnostics on your entered information:

-

ALTER TABLE serendipity_authors ADD COLUMN hashtype int(1);

/ No database selected

ALTER TABLE serendipity_authors CHANGE password password VARCHAR(64) NOT NULL;

/ No database selected


Your Serendipity installation is now upgraded to version 1.5.4
The site itself displays the following:
Query failed:

SELECT


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

a.realname AS author,
a.username AS loginname,
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 JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 0
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND e.timestamp <= 1288983300 AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL

)
)
GROUP BY e.id

ORDER BY timestamp DESC
LIMIT 15

/ No database selected
I tried from phpmydamin to update the DB file from the latest DB from the SQL folder in the downloaded upgrade, and got the following error in phpmyadmin:
CREATE TABLE {PREFIX}authors(
realname varchar( 255 ) NOT NULL default '',
username varchar( 32 ) default NULL ,
PASSWORD varchar( 64 ) default NULL ,
authorid{AUTOINCREMENT}{ PRIMARY },
mail_comments int( 1 ) default '1',
mail_trackbacks int( 1 ) default '1',
email varchar( 128 ) NOT NULL default '',
userlevel int( 4 ) {UNSIGNED} NOT NULL default '0',
right_publish int( 1 ) default '1',
hashtype int( 1 ) default '0'
){UTF_8};

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{PREFIX}authors (
realname varchar(255) NOT NULL default '',
username varcha' at line 1

BTW, hosted at godaddy.

Thanks for any insight in repairing.

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Query failed

Post by garvinhicking » Sat Nov 06, 2010 2:28 pm

Hi!

"No database selected" would happen if your serendipity_cnfig_local file is missing a proper database name, and so the installer could not execute teh require updates. You would need to set the version to your previous version, check the database name and then re-execute the upgrade...

HTH,
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/

Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 7:59 pm
Contact:

Re: Query failed

Post by Xanthouos » Sat Nov 06, 2010 11:31 pm

Thank you, worked like a charm!
In recent projects, I've been more in Drupal, but I miss S9Y....am considering for my next assignment ;-)

Keep up the good work. I still have several sites stable, running this awesomeness.

Have a great weekend.

Best,

David
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com

Post Reply