[pLog-svn] more comment stuff

Jon Daley plogworld at jon.limedaley.com
Thu Apr 13 22:09:13 GMT 2006


 	Is this valid SQL (other than the PK part), or what are you doing 
with the IN() part?  I expected it to say count(PK) FROM articles_comments 
where article_id=x.
 	But, I think you are trying to do something fancy, so I just don't 
know what is going on.

On Thu, 13 Apr 2006, Christoph Feddersen wrote:
> I suppose you know the ids of these rows, so you could fire some
> Count(PK)
> FROM articles
> where blog_id IN ()
> GROUP BY blog_id
>
> to get the new number of comments for all affected articles.
>
> Oscar Renalias wrote:
>> Never mind. The question was just plain stupid... I was thinking that
>> during the DELETE other records might get updated (because of the
>> order flip), but that just doesn't make any sense whatsoever :-)
>>
>> I will take a look at the code.
>>
>> Oscar
>>
>> On 4/13/06, Christoph Feddersen <feddersen at herr-der-ringe-film.de> wrote:
>>>
>>> Oscar Renalias wrote:
>>>> Does anybody know whether a DELETE query automatically updates
>>>> timestamp fields (like the same sort of behaviour when running INSERT
>>>> or an UPDATE)
>>> What timestamp field should it update while deleting the entire record?
>>> Or I didn't get your question.
>>>
>>>> On 4/13/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>>>>>         Did anyone check in code recently having to do with comment stuff,
>>>>> I have another bug today, but it seems to change.
>>>>>
>>>>>         I have a post that had 4 comments (two duplicates, although I
>>>>> don't know how that happened either - I mean, the user did it, but I
>>>>> thought: one, we checked for duplicates, and two, the page redirects after
>>>>> posting, so the user must have hit back and post again or something).
>>>>>
>>>>> The comments were in the correct order, latest post at the bottom.  I went
>>>>> into the admin interface, and deleted one of the duplicates.  I reloaded
>>>>> the page, and the comment disappeared, but the order changed to most
>>>>> recent on top.
>>>>>
>>>>> This happened on another post this morning, where it was marked as spam,
>>>>> and so the user reposted it 4 times.  I marked one as non-spam, purged the
>>>>> rest, and the order flipped.


More information about the pLog-svn mailing list