<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ActiveRecord in PHP</title>
	<atom:link href="http://lukebaker.org/projects/activerecord-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukebaker.org</link>
	<description>lukebaker.org</description>
	<lastBuildDate>Thu, 15 Sep 2011 16:37:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Mike</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-30593</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 17 Aug 2011 04:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-30593</guid>
		<description>I might be missing something but I came to the page and it was nothing but comments.  Where is the actual article?

Best.</description>
		<content:encoded><![CDATA[<p>I might be missing something but I came to the page and it was nothing but comments.  Where is the actual article?</p>
<p>Best.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalle Henriksson</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-21719</link>
		<dc:creator>Kalle Henriksson</dc:creator>
		<pubDate>Wed, 15 Jul 2009 07:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-21719</guid>
		<description>Sorry guys! My bad! If I had paid a little more attention to what I was doing this would not have happened. My relationship declarations in the models are wrong. Where it says &quot;categories&quot; it should be &quot;productcategories&quot;. And &quot;categorizations&quot; should be &quot;productcategorizations&quot;.

Maan... I&#039;ll try to hide my shame behind the fact that I&#039;m a PHP noob :o) (but even noobs can often read and spell correctly, can&#039;t they? Darn!) ;o)

Thanks!</description>
		<content:encoded><![CDATA[<p>Sorry guys! My bad! If I had paid a little more attention to what I was doing this would not have happened. My relationship declarations in the models are wrong. Where it says &#8220;categories&#8221; it should be &#8220;productcategories&#8221;. And &#8220;categorizations&#8221; should be &#8220;productcategorizations&#8221;.</p>
<p>Maan&#8230; I&#8217;ll try to hide my shame behind the fact that I&#8217;m a PHP noob :o) (but even noobs can often read and spell correctly, can&#8217;t they? Darn!) ;o)</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalle Henriksson</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-21707</link>
		<dc:creator>Kalle Henriksson</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-21707</guid>
		<description>Looks like my example code went through some security checks there. ;o) Anyway... I have two simple foreach loops. One outer, going through my products and printing their names and an inner loop going through and printing the names of the categories for each product. Simple enough. But h-nooo... It fails, giving me the above error.

Anyone?

Thanks!</description>
		<content:encoded><![CDATA[<p>Looks like my example code went through some security checks there. ;o) Anyway&#8230; I have two simple foreach loops. One outer, going through my products and printing their names and an inner loop going through and printing the names of the categories for each product. Simple enough. But h-nooo&#8230; It fails, giving me the above error.</p>
<p>Anyone?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalle Henriksson</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-21699</link>
		<dc:creator>Kalle Henriksson</dc:creator>
		<pubDate>Tue, 14 Jul 2009 13:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-21699</guid>
		<description>Hi..!

Iv&#039;e run into a small problem with a very basic test project of mine. I&#039;ve got 3 tables: products, productcategories and productcategorization. The last one bacause och my many:many relationship between products and productcategories. The tables all have some data.



The relationships between my models are set up as follow...

Product.php
protected $has_many = array(&#039;productcategorizations&#039;, array(&#039;categories&#039; =&gt; array(&#039;through&#039; =&gt; &#039;categorizations&#039;)));

Productcategory.php
protected $has_many = array(&#039;categorizations&#039;, array(&#039;products&#039; =&gt; array(&#039;through&#039; =&gt; &#039;categorizations&#039;)));

Productcategorization.php
protected $belongs_to = array(&#039;product&#039;, &#039;category&#039;);



So far so good... But then I run my script...

 $p){
		echo(&#039;Product: &#039;.$p-&gt;text.&#039;&#039;);
		foreach($p-&gt;categories as $pci =&gt; $pc){
			echo(&#039;Category: &#039;.$pc-&gt;text.&#039;&#039;);
		}
		echo(&#039;&#039;);
	}
?&gt;

...and it crashes...

I get the following long message...

PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#039;Category::find&#039; was given in blablabla...\server\models\activerecord\HasMany.php on line 64 PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#039;Category::find&#039; was given in blablabla...\server\models\activerecord\HasMany.php on line 64 PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#039;Category::find&#039; was given in blablabla...\server\models\activerecord\HasMany.php on line 64 


Does anyone know what I&#039;m doing wrong? I&#039;ll keep digging and post the solution if I come up with one. ;o)

Thanks!

PS. Maan I love this code. Coding PHP is sooo much easier now..!</description>
		<content:encoded><![CDATA[<p>Hi..!</p>
<p>Iv&#8217;e run into a small problem with a very basic test project of mine. I&#8217;ve got 3 tables: products, productcategories and productcategorization. The last one bacause och my many:many relationship between products and productcategories. The tables all have some data.</p>
<p>The relationships between my models are set up as follow&#8230;</p>
<p>Product.php<br />
protected $has_many = array(&#8216;productcategorizations&#8217;, array(&#8216;categories&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;categorizations&#8217;)));</p>
<p>Productcategory.php<br />
protected $has_many = array(&#8216;categorizations&#8217;, array(&#8216;products&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;categorizations&#8217;)));</p>
<p>Productcategorization.php<br />
protected $belongs_to = array(&#8216;product&#8217;, &#8216;category&#8217;);</p>
<p>So far so good&#8230; But then I run my script&#8230;</p>
<p> $p){<br />
		echo(&#8216;Product: &#8216;.$p-&gt;text.&#8221;);<br />
		foreach($p-&gt;categories as $pci =&gt; $pc){<br />
			echo(&#8216;Category: &#8216;.$pc-&gt;text.&#8221;);<br />
		}<br />
		echo(&#8221;);<br />
	}<br />
?&gt;</p>
<p>&#8230;and it crashes&#8230;</p>
<p>I get the following long message&#8230;</p>
<p>PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#8216;Category::find&#8217; was given in blablabla&#8230;\server\models\activerecord\HasMany.php on line 64 PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#8216;Category::find&#8217; was given in blablabla&#8230;\server\models\activerecord\HasMany.php on line 64 PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, &#8216;Category::find&#8217; was given in blablabla&#8230;\server\models\activerecord\HasMany.php on line 64 </p>
<p>Does anyone know what I&#8217;m doing wrong? I&#8217;ll keep digging and post the solution if I come up with one. ;o)</p>
<p>Thanks!</p>
<p>PS. Maan I love this code. Coding PHP is sooo much easier now..!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-20962</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 23 Apr 2009 00:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-20962</guid>
		<description>Victor, thanks for the bug report.  I&#039;ve modified the file to properly find the correct association when calling those types of methods.  You can either pull the updated info from Subversion or try out release 0.3 that I made today.</description>
		<content:encoded><![CDATA[<p>Victor, thanks for the bug report.  I&#8217;ve modified the file to properly find the correct association when calling those types of methods.  You can either pull the updated info from Subversion or try out release 0.3 that I made today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Zagorski</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-20811</link>
		<dc:creator>Victor Zagorski</dc:creator>
		<pubDate>Thu, 16 Apr 2009 04:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-20811</guid>
		<description>Hello, thanks for your lib. I&#039;ve found it usefull.

I&#039;ve found a problem in it. When I use code

$post-&gt;comments_push($comment);
it&#039;s ok

but when I say
$post-&gt;green_crocodiles_push($cro);
It produces an error.

It can be easily fixed, if you change following code:
list($accoc, $func) = explode(&quot;_&quot;; $name; 2);
with:
$tmp = explode(&quot;_&quot;, $name);
$func = array_pop($tmp);
$assoc = implode(&quot;_&quot;, $tmp);</description>
		<content:encoded><![CDATA[<p>Hello, thanks for your lib. I&#8217;ve found it usefull.</p>
<p>I&#8217;ve found a problem in it. When I use code</p>
<p>$post-&gt;comments_push($comment);<br />
it&#8217;s ok</p>
<p>but when I say<br />
$post-&gt;green_crocodiles_push($cro);<br />
It produces an error.</p>
<p>It can be easily fixed, if you change following code:<br />
list($accoc, $func) = explode(&#8220;_&#8221;; $name; 2);<br />
with:<br />
$tmp = explode(&#8220;_&#8221;, $name);<br />
$func = array_pop($tmp);<br />
$assoc = implode(&#8220;_&#8221;, $tmp);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-19668</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Thu, 19 Feb 2009 14:44:20 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-19668</guid>
		<description>Hi Luke!

Great!

Post your project in Github.com repository, to sharing with comunites.

Thnks!
Steven</description>
		<content:encoded><![CDATA[<p>Hi Luke!</p>
<p>Great!</p>
<p>Post your project in Github.com repository, to sharing with comunites.</p>
<p>Thnks!<br />
Steven</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Comparatif ORM pour php. &#124; traffic-internet.net</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-19480</link>
		<dc:creator>Comparatif ORM pour php. &#124; traffic-internet.net</dc:creator>
		<pubDate>Fri, 06 Feb 2009 17:23:59 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-19480</guid>
		<description>[...] Vous trouverez toutes les informations sur le site officiel.  Pour les plus curieux, une définition d&#8217;active record est disponible ici et un exemple d&#8217;utilisation ici [...]</description>
		<content:encoded><![CDATA[<p>[...] Vous trouverez toutes les informations sur le site officiel.  Pour les plus curieux, une définition d&#8217;active record est disponible ici et un exemple d&#8217;utilisation ici [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Jeffries</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-19432</link>
		<dc:creator>Andy Jeffries</dc:creator>
		<pubDate>Thu, 22 Jan 2009 08:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-19432</guid>
		<description>@Bill:

&quot;Read some places were they suggested it was due to using php 4 but then I rechecked my php version using the php.info page and it shows that I am running php 5.2.5&quot;

Did you check the phpinfo from the command line (I&#039;m assuming the generate.php is a command line script) or via Apache?

It&#039;s possible Apache is using your 5.2.5 whereas the command line PHP binary being found is an old 4.x one that&#039;s still in your path.

From the command line run &quot;php -v&quot; to get the version (or &quot;php -i&quot; to see the phpinfo generated from the command line binary).</description>
		<content:encoded><![CDATA[<p>@Bill:</p>
<p>&#8220;Read some places were they suggested it was due to using php 4 but then I rechecked my php version using the php.info page and it shows that I am running php 5.2.5&#8243;</p>
<p>Did you check the phpinfo from the command line (I&#8217;m assuming the generate.php is a command line script) or via Apache?</p>
<p>It&#8217;s possible Apache is using your 5.2.5 whereas the command line PHP binary being found is an old 4.x one that&#8217;s still in your path.</p>
<p>From the command line run &#8220;php -v&#8221; to get the version (or &#8220;php -i&#8221; to see the phpinfo generated from the command line binary).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pet</title>
		<link>http://lukebaker.org/projects/activerecord-in-php/comment-page-1/#comment-17316</link>
		<dc:creator>Pet</dc:creator>
		<pubDate>Mon, 28 Jul 2008 17:23:10 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/projects/activerecord-in-php/#comment-17316</guid>
		<description>Hi Luke,

first, I would like to say I really like the class you&#039;ve made! Sure makes programming PHP a lot easier and a lot more fun :)

At http://www.painfullscratch.nl/code/activerecord.diff you&#039;ll find a small patch (against revision 280) which handles these changes:

- require_once will now require the absolute filename instead of a relative one. I&#039;m having a project in which another &quot;config.php&quot; was present in the require_path. This resulted in an error.

- classes with which there is an association will automaticly be required.

- the is_modified() method will now only return true when the record is actually modified (I don&#039;t know what Ruby&#039;s behavior is?).

Please let me know what you think.(I&#039;ll leave for vacation tomorrowmorning, so if you would like to start a discussion, you&#039;ll have to be patient for my reaction :)).

Best regards,

Patrick &#039;Pet / Petski&#039; Kuijvenhoven
The Netherlands</description>
		<content:encoded><![CDATA[<p>Hi Luke,</p>
<p>first, I would like to say I really like the class you&#8217;ve made! Sure makes programming PHP a lot easier and a lot more fun :)</p>
<p>At <a href="http://www.painfullscratch.nl/code/activerecord.diff" rel="nofollow">http://www.painfullscratch.nl/code/activerecord.diff</a> you&#8217;ll find a small patch (against revision 280) which handles these changes:</p>
<p>- require_once will now require the absolute filename instead of a relative one. I&#8217;m having a project in which another &#8220;config.php&#8221; was present in the require_path. This resulted in an error.</p>
<p>- classes with which there is an association will automaticly be required.</p>
<p>- the is_modified() method will now only return true when the record is actually modified (I don&#8217;t know what Ruby&#8217;s behavior is?).</p>
<p>Please let me know what you think.(I&#8217;ll leave for vacation tomorrowmorning, so if you would like to start a discussion, you&#8217;ll have to be patient for my reaction :)).</p>
<p>Best regards,</p>
<p>Patrick &#8216;Pet / Petski&#8217; Kuijvenhoven<br />
The Netherlands</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.234 seconds -->

