[pLog-svn] r4993 - plog/branches/lifetype-1.2/class/action

Jon Daley plogworld at jon.limedaley.com
Mon Mar 5 22:42:00 EST 2007


 	There have been some posts on the forums (and I thought this list 
too) where I think the error was owner_id was set to '' and so the query 
was failing.  It had to do with resources.  That might be enough 
information for you to find the error, either the forums or code, I am not 
sure which would be faster.

On Tue, 6 Mar 2007, Mark Wu wrote:

> Hi Jon:
>
> I am not so sure, if you can point the problem to me, I can check it.
>
> The user_id field in MySQL is "INT" and allow "NULL", in mysql 5 strict mode
> , the NULL means 0 not '', that why we need to serUserId to fix this.
>
> Mark
>
>> -----Original Message-----
>> From: plog-svn-bounces at devel.lifetype.net
>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
>> Sent: Tuesday, March 06, 2007 3:20 AM
>> To: plog-svn at devel.lifetype.net
>> Subject: Re: [pLog-svn] r4993 -
>> plog/branches/lifetype-1.2/class/action
>>
>>  	Is this related to the userid problem that people
>> sometimes have with resources?  Maybe there is another place
>> where we need to call setUserId?
>>
>> On Mon, 5 Mar 2007, mark at devel.lifetype.net wrote:
>>
>>> Author: mark
>>> Date: 2007-03-05 10:36:09 -0500 (Mon, 05 Mar 2007) New
>> Revision: 4993
>>>
>>> Modified:
>>>   plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
>>> Log:
>>> We need to set the user_id to 0 in add_comment to fulfill
>> Mysql 5 strict mode.
>>>
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
>>> ===================================================================
>>> ---
>> plog/branches/lifetype-1.2/class/action/addcommentaction.cl
>> ass.php	2007-03-05 10:36:01 UTC (rev 4992)
>>> +++
>> plog/branches/lifetype-1.2/class/action/addcommentaction.cl
>> ass.php	2007-03-05 15:36:09 UTC (rev 4993)
>>> @@ -183,6 +183,8 @@
>>> 			if( $this->_userInfo ) {
>>> 				// ...and if so, save the user
>> data in the UserComment object
>>> 				$comment->setUser( $this->_userInfo );
>>> +			} else {
>>> +				$comment->setUserId( 0 );
>>> 			}
>>>
>>> 			// fire an event
>>>
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>
>>
>> --
>> Jon Daley
>> http://jon.limedaley.com/
>>
>> If it weren't for the last minute, nothing would get done.
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Some people, when confronted with a problem, think "I know, I'll use
regular expressions." Now they have two problems.
-- Jamie Zawinski


More information about the pLog-svn mailing list