Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 193
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 198
Total: 198

Author Topic: Database error  (Read 927 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • 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: 16436
    • 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: 16436
    • 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
11568 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
10 Replies
10480 Views
Last post February 24, 2009, 08:08:08 pm
by Beltazar
Database Error

Started by pioneer « 1 2 » Support

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

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal