Welcome to Geeklog, Anonymous Thursday, January 02 2025 @ 10:16 pm EST

Geeklog Forums

SQL error when updating from 1.4.0sr5-1 to 1.4.1


Richard Pitt

Anonymous
sorry for posting previously in another topic Frown

After the update I get the "success" screen but when going to the site I get "An SQL error has occurred. Please see error.log for details." and log contains:
Text Formatted Code
Sat 24 Mar 2007 21:01:59 EDT - 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 '))) AND (date <= NOW()) AND (draft_flag = 0) AND (tid <> 'archive')' at line 1. SQL in question: SELECT COUNT(*) AS count FROM gl_stories WHERE (date >= (date_sub(NOW(), INTERVAL  SECOND))) AND (date <= NOW()) AND (draft_flag = 0) AND (tid <> 'archive')
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Make sure you have $_CONF['newstoriesinterval'] set in your config.php. Also check for possible syntax errors.

bye, Dirk
 Quote

richard pitt

Anonymous
Quote by: Dirk

Make sure you have $_CONF['newstoriesinterval'] set in your config.php. Also check for possible syntax errors.

bye, Dirk



It was exactly that - I had it commented out in previous config so did the same here - seems that this time it is NECESSARY! Not sure why I had commented it out but everything works now Smile

Thanks
 Quote

Jules

Anonymous
confused
Just moving to new server and installed 1.4.1 on new server from 1.4.0sr5-1 on old. Imported database from old server and the links under "Topics" now return the following error "An SQL error has occurred. Please see error.log for details." All other links work except the "logout" returns the same error.

Log shows the following:
Wed 02 May 2007 14:20:34 MDT - 1054: Unknown column 'sp_help' in 'field list'. SQL in question: SELECT sp_id,sp_title,sp_content,sp_format,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon,sp_php,sp_inblock,sp_help FROM gl_staticpage WHERE (sp_centerblock = 1) AND (sp_where = 0) AND ((sp_tid = 'none'Wink OR (sp_tid = 'all'Wink) AND (((owner_id = '3'Wink AND (perm_owner >= 2)) OR ((group_id IN (2,4,7,11,18,5,13,12,10,8,1,14,3,6,9,17,15)) AND (perm_group >= 2)) OR (perm_members >= 2)) ORDER BY sp_id

Please advise. Many thanks.

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Did you run the database update?

bye, Dirk
 Quote

Jules

Anonymous
I have not, but will do that now. Do you have the mysql syntax to run the db update please? I'm not too savy on sql. I have found where the updates are located.

Thank you!
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Log in admin and go to /admin/install/install.php and it will ask if you want to upgrade. You do not do the sql update manually.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

Jules

Anonymous
Thank you for pointing me to the right place to update . . .instead of trying to run manually.

I did the upgrade, initially getting a message "1060: Duplicate column name remark"

I removed this column from a table, ran the update again, and the update ran successfully.

Thanks very much. Your brilliance is appreciated, when I had hit a brick wall.


 Quote

All times are EST. The time is now 10:16 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content