Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11781
Latest: tumovilexperts
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40990
Total Topics: 7177
Most Online Today: 61
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Database error  (Read 232 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Newbie
  • *****
  • Posts: 16
    • 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: 15469
    • 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: 15469
    • 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
8659 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
4 Replies
4189 Views
Last post October 09, 2011, 03:59:37 pm
by SMFHacks
Database error

Started by davejo « 1 2 » Support

15 Replies
11351 Views
Last post March 23, 2013, 03:13:33 am
by davejo
3 Replies
3335 Views
Last post December 01, 2013, 05:37:43 pm
by SMFHacks
New database error

Started by Mike66 « 1 2 » Support

23 Replies
5855 Views
Last post February 23, 2015, 12:41:27 pm
by Mike66

+- Recent Topics

Translation of the submenu. by Panoulis64
July 14, 2021, 09:31:41 am

Database error by SMFHacks
July 11, 2021, 09:17:02 pm

SMF 2.1 RC4 Released by SMFHacks
July 10, 2021, 11:05:08 am

Videos and server resources? by SMFHacks
July 09, 2021, 09:29:40 am

Where are original uploaded files stored? by robgratt
June 20, 2021, 12:41:48 pm

Errors for nonexistent members by Krash
June 14, 2021, 09:51:47 pm

Error message: cannot access upload path by SMFHacks
June 08, 2021, 10:06:22 am

How to change order of the Classifieds board by SMFHacks
May 31, 2021, 09:57:36 am

Standard version of Downloads mod value missing by SMFHacks
May 25, 2021, 11:32:48 pm

Privacy Link by SMFHacks
May 14, 2021, 11:11:51 am

Powered by EzPortal