Hi Guys,
Thanks for the help on this but I have to admit that now I am really really confused 
Derek Jones - 06 July 2008 06:40 AM
Back to this post Mark, did you try the code sample I indicated in a template? Make sure you have error reporting enabled in your environment. Testing is important as well, surely this latest version is not behaving as you’d expect it to, unless you are testing with the Getting Started entry that comes installed with EE.
Hi Derek,
I tried that code, I guess that I was supposed to surround it with php tags first though? By error reporting do you mean the :
Admin->System Preferences->Output and Debugging Preferences->Debug Preference
or something else perhaps?
I tried placing the code you showed in a template with PHP enabled with surrounding PHP tags and visited the template but just got a blank page with no source to it. Is that what I should expect to see? If so then I am completely dumb as I don’t quite get what it all means I’m afraid.
As to the version that I have on my system it is working fine with any entry and any weblog so not too sure why you would think it would only work with the Getting Started entry which I always delete upon installing ExpressionEngine anyway. Any more information as to where I am going wrong would be great though although at the moment I am seeing this all working the way I expect it to unless I really am WAY too tired and completely missing the point?
peschehimself - 06 July 2008 07:14 AM
Ah ok, but still, this does not account for the error it might throw, because if there are no rows in the query result
if ($query->row['entry_id'] != 1)
this will throw an error as there’s not ‘entry_id’ in the row array, whereas
if ($query->num_rows != 1)
will always exist, num_rows as the property of the $query object will exist even if no rows were selected. Do you see the difference? In my example, I’m not accessing any array field of the $query->row property.
I have to completely throw my hands in the air now and say that I’m afraid I didn’t understand this part, sorry 
I have uploaded the ‘test’ version which I have on my system which to me seems to be working fine in the way that I want it to which is that if a person has already posted a comment to the entry then they aren’t allowed to post again and the other way being that if they haven’t posted a comment yet then they are allowed to.
If possible could you explain to me in simpleton terms (as that is what I must be
) what it is that I am still doing wrong and why it isn’t working as I see it on my system as indeed working.
Thanks for the help on this. I read through all the developer guidelines and I am trying to apply everything there to my code as far as I can but still it looks like I am obviously not quite getting it all 
Best wishes,
Mark