[Burichan] [Futaba] [Howler] - [Home] [Manage]

[Return]
Posting mode: Reply
Leave these fields empty (spam trap):
Name
Link
Subject
Comment
File
Verification
Password (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 1000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.

File: 1506904890739.jpg -(66129 B, 2120x548) Thumbnail displayed, click image for full size.
66129 No.5240  
This is the designated database thread. Please GROUP yourselves here so we can wack off about databases; if you do not like databases plz [spoiler]DELETE[/spoiler] yourself
>> No.5242  
SELECT FROM Files, TagMap, Tags WHERE
(Files.Id=TagMap.FileId AND TagMap.TagId=Tags.Id)
AND
(Tags.Namespace='yuyushiki')

-- Should be SELECT Id FROM
>> No.5269  
File: 1506910142502.png -(44313 B, 500x500) Thumbnail displayed, click image for full size.
44313
Okay /swt/ here's my best SQL query
SELECT Files.Id, Class, COUNT(*) AS Relevance, Indexed FROM Files, TagMap, Tags, single_image WHERE single_image.Id = Files.Id AND Files.Class = 'single_image' AND Files.Id = TagMap.FileId AND TagMap.TagId = Tags.Id AND ((Member = 'yuyushiki')) GROUP BY Files.Id ORDER BY Relevance DESC, Files.Indexed DESC, Files.Id DESC LIMIT 20 OFFSET 20

This bad boy is generated by a big function that does a lot of string processing. . . how fun!


Delete Post []
Password