Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4229
Latest: Ghost
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43063
Total Topics: 7491
Most Online Today: 124
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 53
Total: 53

Author Topic: Database error  (Read 861 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • Member
  • *
  • Posts: 20
    • View Profile
    • Archie Comics Fan Forum
Database error
« on: July 11, 2021, 05:17:28 pm »
Just upgraded one of my sites to 2.1 RC4 and keep getting this error in the log...

Code: [Select]
Database Error: You have an error in your SQL [syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '|| c.view =1)))

AND p.id_member = 53 AND p.approved = 1' at line 8

SELECT COUNT(*) AS total FROM (smf_gallery_pic as p)

LEFT JOIN smf_members AS m ON (m.id_member = p.id_member)
LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = IF(m.ID_GROUP = 0, m.ID_POST_GROUP, m.ID_GROUP))
LEFT JOIN smf_gallery_usersettings AS s ON (s.id_member = m.id_member)
LEFT JOIN smf_gallery_catperm AS c ON (c.ID_GROUP IN (-1) AND c.ID_CAT = p.ID_CAT)
LEFT JOIN smf_gallery_log_mark_view AS v ON (p.id_picture = v.id_picture AND v.id_member = 53 AND v.user_id_cat = p.USER_ID_CAT)
WHERE (((s.private =0 || s.private IS NULL ) AND (s.password = '' || s.password IS NULL ) AND p.USER_ID_CAT !=0 AND p.approved = 1) || (p.USER_ID_CAT =0 AND p.approved = 1 AND (c.view IS NULL || c.view =1)))

AND p.id_member = 53 AND p.approved = 1

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16349
    • View Profile
Re: Database error
« Reply #1 on: July 11, 2021, 07:47:22 pm »
Are you using the latest gallery version thought I fixed it.  Issue was using the || operator instead of OR
What was line/file number of the error.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16349
    • View Profile
Re: Database error
« Reply #2 on: July 11, 2021, 09:17:02 pm »
Found a couple spots I missed use the latest version attached to
https://www.smfhacks.com/index.php/topic,9539.msg41642.html#msg41642
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
10051 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
10 Replies
9369 Views
Last post February 24, 2009, 08:08:08 pm
by Beltazar
Database Error

Started by pioneer « 1 2 » Support

22 Replies
11896 Views
Last post April 18, 2009, 11:58:55 am
by SMFHacks
5 Replies
5804 Views
Last post January 22, 2010, 11:26:48 am
by SMFHacks
4 Replies
4826 Views
Last post October 09, 2011, 03:59:37 pm
by SMFHacks

+- Recent Topics

[Mod]Discord Web Hooks by SMFHacks
Today at 03:57:28 pm

SMF 2.1.4 Search by Anmer
Today at 01:55:15 pm

Looking for a good video player by SMFHacks
September 21, 2023, 06:06:46 am

Error in thise mode by Ghost
September 15, 2023, 08:42:24 am

Gallery Selection List Order by mickjav
September 07, 2023, 12:46:31 pm

[Mod]Tidy Child Boards 2.0 by Norwinjose
September 02, 2023, 11:42:54 am

PrettyUrls SEO Pro: Unable to submit sitemap to google search conmsole by SMFHacks
August 31, 2023, 10:55:22 am

PrettyURL - SEO4SMF Rewrites? by SMFHacks
August 28, 2023, 06:35:33 pm

Web versus Mobile by SMFHacks
August 28, 2023, 03:12:57 pm

IPN, Classifieds and Store by Saftek
August 21, 2023, 12:45:36 am

Powered by EzPortal