Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11839
Latest: BugginIn
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 42415
Total Topics: 7393
Most Online Today: 66
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 43
Total: 44

Author Topic: Database error  (Read 788 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 18
    • 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: 16084
    • 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: 16084
    • 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
9859 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
10 Replies
9159 Views
Last post February 24, 2009, 08:08:08 pm
by Beltazar
Database Error

Started by pioneer « 1 2 » Support

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

+- Recent Topics

Quick moderation checkboxes in search result? by SMFHacks
August 08, 2022, 10:37:03 am

Setting a single free download. by Zaphod
August 07, 2022, 10:39:26 am

Contact Page Mod Not Working by SMFHacks
August 05, 2022, 12:19:43 pm

Issues with new Newsletter Pro installation by SMFHacks
August 05, 2022, 07:15:18 am

SMFBlog Mod by Nicole
August 03, 2022, 09:46:22 pm

Contact Page by Nicole
August 03, 2022, 09:45:42 pm

trader + classifieds by Nicole
August 03, 2022, 05:05:17 pm

Category Permissions List by SMFHacks
July 30, 2022, 07:53:24 am

Some questions by mickjav
July 30, 2022, 03:31:07 am

prettyurls - TroubleShooting.wiki by SMFHacks
July 29, 2022, 12:27:28 pm

Powered by EzPortal