Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Warning Notification (Icon).
#5
This user has been denied support. This user has been denied support.
(2012-09-23, 05:43 PM)Yaldaram Wrote: You're making a very big query Unadkat. You do not have to use users and posts tables since you can directly fetch the warned post from its pid on postbit from warnings table.
Yes, I think I gave it a try but just pid didn't worked, so I added uid, I will retry it and give it a try tomorrow. Yes, that unfortunately runs around 9-10 queries on showthread. I also tried caching it, but I'm not too good with cache and unfortunately that didn't worked, if you've any suggestion for cache, that would be appreciated.

Quote:Anyway, querying on each post is too weighty. I would suggest to create a column in posts table, and then update this column when warning issues and on warning expires. You can then simply use $post['column_name'] and check if its true then shows the icon and if its false removes the icon.
This seems a great idea, I think I shall also try to do this, thanks. Smile
Reply


Messages In This Thread
Post Warning Notification (Icon). - by crazy4cs - 2012-09-23, 07:43 AM
RE: Post Warning Notification (Icon). - by crazy4cs - 2012-09-23, 07:08 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:16 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:28 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:29 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:38 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:40 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:52 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 07:56 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 08:37 PM
RE: Post Warning Notification (Icon). - by Euan T - 2012-09-23, 08:51 PM
RE: Post Warning Notification (Icon). - by iHydra - 2012-09-23, 09:11 PM
RE: Post Warning Notification (Icon). - by lexy - 2012-09-28, 08:14 AM
RE: Post Warning Notification (Icon). - by lexy - 2012-09-28, 10:26 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)