<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>PHPLinq Forum Rss Feed</title><link>http://www.codeplex.com/PHPLinq/Thread/List.aspx</link><description>PHPLinq Forum Rss Description</description><item><title>New Post: variable inputs of WHERE method</title><link>http://phplinq.codeplex.com/discussions/428846</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;actually,&amp;nbsp;&lt;br&gt;
i got a tip: we can replace $var text by the value :D&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>herohut</author><pubDate>Tue, 08 Jan 2013 08:32:03 GMT</pubDate><guid isPermaLink="false">New Post: variable inputs of WHERE method 20130108083203A</guid></item><item><title>New Post: variable inputs of WHERE method</title><link>http://phplinq.codeplex.com/discussions/428846</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I have a question like following codes. Please see the &lt;strong&gt;$var&lt;/strong&gt; variable&lt;/p&gt;
&lt;p&gt;$array = array(1,2,3,4);&lt;br&gt;
&lt;strong&gt;$var&lt;/strong&gt; = 2;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;$output = from('$it')&lt;span&gt; &lt;br&gt;
&lt;/span&gt;-&amp;gt;in($array)&lt;span&gt; &lt;br&gt;
&lt;/span&gt;-&amp;gt;where('$it=&amp;gt;$it == &lt;strong&gt;$var&lt;/strong&gt;')&lt;span&gt; &lt;br&gt;
&lt;/span&gt;-&amp;gt;select();&lt;/p&gt;
&lt;p&gt;It throws an Exception,&amp;nbsp;&lt;strong&gt;Undefined variable: var&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;is kind of query available in the framework?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>herohut</author><pubDate>Tue, 08 Jan 2013 08:19:57 GMT</pubDate><guid isPermaLink="false">New Post: variable inputs of WHERE method 20130108081957A</guid></item><item><title>New Post: Different Languages</title><link>http://phplinq.codeplex.com/discussions/405244</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi, I used &lt;strong&gt;PHPExcel&lt;/strong&gt;&amp;nbsp;it generates csv for English language content very fine but for other languages (CZ,CH etc)
&lt;span&gt;the text becomes garbled in csv file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please suggest how could I get correct csv for all languages.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>PHPFerrari</author><pubDate>Sat, 01 Dec 2012 13:45:13 GMT</pubDate><guid isPermaLink="false">New Post: Different Languages 20121201014513P</guid></item><item><title>New Post: Indent the first line</title><link>http://phplinq.codeplex.com/discussions/271572</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;sorry,i Write wrong place,it is word issue.&lt;/p&gt;&lt;/div&gt;</description><author>wangzhi</author><pubDate>Tue, 06 Sep 2011 02:55:30 GMT</pubDate><guid isPermaLink="false">New Post: Indent the first line 20110906025530A</guid></item><item><title>New Post: Indent the first line</title><link>http://phplinq.codeplex.com/discussions/271572</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;add code ：&lt;/p&gt;
&lt;p&gt;$objWriter-&amp;gt;startElement('w:ind');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
$objWriter-&amp;gt;writeAttribute('w:firstLine', 450);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;$objWriter-&amp;gt;endElement();&lt;/p&gt;
&lt;p&gt;into&amp;nbsp;&amp;nbsp;branch:&lt;/p&gt;
&lt;p&gt;/phpword/writer/word2007/base.php&lt;/p&gt;
&lt;p&gt;function name:&lt;/p&gt;
&lt;p&gt;_writeParagraphStyle()&lt;/p&gt;
&lt;/div&gt;</description><author>wangzhi</author><pubDate>Tue, 06 Sep 2011 02:43:14 GMT</pubDate><guid isPermaLink="false">New Post: Indent the first line 20110906024314A</guid></item><item><title>New Post: Licence applied to the library</title><link>http://phplinq.codeplex.com/discussions/263547</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Should be LGPL, fixing it here on the website.&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Mon, 04 Jul 2011 06:12:43 GMT</pubDate><guid isPermaLink="false">New Post: Licence applied to the library 20110704061243A</guid></item><item><title>New Post: Licence applied to the library</title><link>http://phplinq.codeplex.com/discussions/263547</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've a problem to understand under which licence the library is published.&lt;/p&gt;
&lt;p&gt;On this site, it is claimed to be licenced under GPL. However, in source file, the licence template applied is LGPL.&lt;/p&gt;
&lt;p&gt;Which one is the correct licence ?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;/div&gt;</description><author>varaxor</author><pubDate>Fri, 01 Jul 2011 12:39:58 GMT</pubDate><guid isPermaLink="false">New Post: Licence applied to the library 20110701123958P</guid></item><item><title>New Post: Using SELECT COUNT</title><link>http://phplinq.codeplex.com/discussions/262545</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was wondering how can I write in PHPLinq a query using COUNT? Something like:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11pt"&gt;SELECT COUNT(cars.id) AS total_cars FROM cars&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11pt"&gt;Thanks!&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>mihaigpm</author><pubDate>Thu, 23 Jun 2011 18:14:26 GMT</pubDate><guid isPermaLink="false">New Post: Using SELECT COUNT 20110623061426P</guid></item><item><title>New Post: file is required</title><link>http://phplinq.codeplex.com/discussions/260924</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;The resolution is in the error message: try including Zend framework in your code?&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Tue, 14 Jun 2011 08:13:38 GMT</pubDate><guid isPermaLink="false">New Post: file is required 20110614081338A</guid></item><item><title>New Post: file is required</title><link>http://phplinq.codeplex.com/discussions/260924</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;The resolution is in the error message: try including Zend framework in your code?&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Tue, 14 Jun 2011 08:13:38 GMT</pubDate><guid isPermaLink="false">New Post: file is required 20110614081338A</guid></item><item><title>New Post: Is there in() query</title><link>http://phplinq.codeplex.com/discussions/261277</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I want know in this list, is it possible to write in('sa', 'ga')&lt;/p&gt;
&lt;/div&gt;</description><author>ittechsathish</author><pubDate>Tue, 14 Jun 2011 07:24:44 GMT</pubDate><guid isPermaLink="false">New Post: Is there in() query 20110614072444A</guid></item><item><title>New Post: file is required</title><link>http://phplinq.codeplex.com/discussions/260924</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;&lt;strong&gt;Fatal error&lt;/strong&gt;: require_once() [&lt;a href="http://localhost/phptest/function.require"&gt;function.require&lt;/a&gt;]: Failed opening required 'Zend/Db/Adapter/Abstract.php' (include_path='.;C:\xampp\php\PEAR;C:\xampp\htdocs\phptest\sites\all\modules\codelibrary\app_code\linq')
 in&lt;strong&gt;C:\xampp\htdocs\phptest\sites\all\modules\codelibrary\app_code\linq\PHPLinq\Adapter\Abstract.php&lt;/strong&gt;&amp;nbsp;on line&amp;nbsp;&lt;strong&gt;33&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;how to resolve that&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;regards sathish.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>ittechsathish</author><pubDate>Fri, 10 Jun 2011 13:47:23 GMT</pubDate><guid isPermaLink="false">New Post: file is required 20110610014723P</guid></item><item><title>New Post: firstOrDefault seems not to work</title><link>http://phplinq.codeplex.com/discussions/252271</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;No-no-no! It should remain null.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actually I was wrong in first message - functions DO return something, but something strange. Look at following code (and remarks):&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&amp;lt;?php

&lt;span style="color: green;"&gt;/** PHPLinq_LinqToObjects */&lt;/span&gt;
&lt;span style="color: blue;"&gt;require_once&lt;/span&gt; &lt;span style="color: #a31515;"&gt;'PHPLinq/LinqToObjects.php'&lt;/span&gt;;

&lt;span style="color: blue;"&gt;class&lt;/span&gt; TestClass
{
    &lt;span style="color: blue;"&gt;public&lt;/span&gt; $var1, $var2;
    &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;function&lt;/span&gt; __construct($v1, $v2)
    {
        $this-&amp;gt;var1 = $v1;
        $this-&amp;gt;var2 = $v2;
    }
}

$members = &lt;span style="color: blue;"&gt;array&lt;/span&gt;();
&lt;span style="color: green;"&gt;//add two members to array&lt;/span&gt;
$members[] = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TestClass(&lt;span style="color: #a31515;"&gt;"USD"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"CHF"&lt;/span&gt;);
$members[] = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TestClass(&lt;span style="color: #a31515;"&gt;"GBP"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"JPY"&lt;/span&gt;);
&lt;span style="color: green;"&gt;//print array - it's shown as expected, with "USD-CHF" and "GBP-JPY" pairs&lt;/span&gt;
var_dump($members);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);
&lt;span style="color: green;"&gt;//try any&lt;/span&gt;
$result = from(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;)-&amp;gt;in($members)-&amp;gt;any(&lt;span style="color: #a31515;"&gt;'$m-&amp;gt;var1 = "GBP"'&lt;/span&gt;);
&lt;span style="color: green;"&gt;//works ok - "true" is shown&lt;/span&gt;
var_dump($result);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);
&lt;span style="color: green;"&gt;//try firstOrdefault&lt;/span&gt;
$result = from(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;)-&amp;gt;in($members)-&amp;gt;firstOrDefault(&lt;span style="color: #a31515;"&gt;'$m-&amp;gt;var1 = "GBP"'&lt;/span&gt;);
&lt;span style="color: green;"&gt;//I expect to see the object, but string(3) "GBP" is shown instead&lt;/span&gt;
var_dump($result);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);
&lt;span style="color: green;"&gt;//try where&lt;/span&gt;
$result = from(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;)-&amp;gt;in($members)-&amp;gt;where(&lt;span style="color: #a31515;"&gt;'$m-&amp;gt;var1 == "GBP"'&lt;/span&gt;)-&amp;gt;select(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;);
&lt;span style="color: green;"&gt;//I expect to see only one object, but two objects with wrong currencies are shown - see results&lt;/span&gt;
var_dump($result);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);

&lt;span style="color: green;"&gt;//everything works with simple strings array BUT:&lt;/span&gt;
&lt;span style="color: green;"&gt;//it works when I use '=' in expression, if I use '==' results are wrong&lt;/span&gt;
$arr = &lt;span style="color: blue;"&gt;array&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;'one'&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;'two'&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;'three'&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;'four'&lt;/span&gt;);
$result = from(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;)-&amp;gt;in($arr)-&amp;gt;any(&lt;span style="color: #a31515;"&gt;'$m = "two"'&lt;/span&gt;);
var_dump($result);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);
$result = from(&lt;span style="color: #a31515;"&gt;'$m'&lt;/span&gt;)-&amp;gt;in($arr)-&amp;gt;firstOrDefault(&lt;span style="color: #a31515;"&gt;'$m = "two"'&lt;/span&gt;);
var_dump($result);
&lt;span style="color: blue;"&gt;echo&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;);
?&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;And here are results:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;array(2) { [0]=&amp;gt; object(TestClass)#1 (2) { ["var1"]=&amp;gt; string(3) "USD"  ["var2"]=&amp;gt; string(3) "CHF" } [1]=&amp;gt; object(TestClass)#2 (2) { ["var1"]=&amp;gt;  string(3) "GBP" ["var2"]=&amp;gt; string(3) "JPY" } } &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;bool(true) &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;string(3)  "GBP" &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;array(2) { [0]=&amp;gt; object(TestClass)#1 (2) { ["var1"]=&amp;gt; string(3)  "GBP" ["var2"]=&amp;gt; string(3) "CHF" } [1]=&amp;gt; object(TestClass)#2 (2) {  ["var1"]=&amp;gt; string(3) "GBP" ["var2"]=&amp;gt; string(3) "JPY" } } &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;bool(true) &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;string(3) "two"&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Something wrong with objects and with "=="&lt;/p&gt;&lt;/div&gt;</description><author>oldlamer</author><pubDate>Tue, 05 Apr 2011 17:52:16 GMT</pubDate><guid isPermaLink="false">New Post: firstOrDefault seems not to work 20110405055216P</guid></item><item><title>New Post: firstOrDefault seems not to work</title><link>http://phplinq.codeplex.com/discussions/252271</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Currently, the "default" for a string is null. Should this be ""?&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Tue, 05 Apr 2011 06:12:15 GMT</pubDate><guid isPermaLink="false">New Post: firstOrDefault seems not to work 20110405061215A</guid></item><item><title>New Post: firstOrDefault seems not to work</title><link>http://phplinq.codeplex.com/discussions/252271</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;firstOrdefault method seems not to work.&lt;/p&gt;
&lt;p&gt;I've tried the following in '01-simple.php' example and it returns nothing (not NULL, just nothing)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;$result = from(&lt;span style="color:#a31515"&gt;'$n'&lt;/span&gt;)-&amp;gt;in($names)-&amp;gt;firstOrDefault(&lt;span style="color:#a31515"&gt;'$n =&amp;gt; $n == &amp;quot;Joe&amp;quot;'&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;May be I do something wrong?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;/div&gt;</description><author>oldlamer</author><pubDate>Sat, 02 Apr 2011 20:56:03 GMT</pubDate><guid isPermaLink="false">New Post: firstOrDefault seems not to work 20110402085603P</guid></item><item><title>New Post: Joining Objects</title><link>http://phplinq.codeplex.com/Thread/View.aspx?ThreadId=230563</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;hHis one is possible with PHPLinq but the query will not be optimized. Instead, PHPLinq in its current implementation will read all orders and all customers into memory. Therefore I think it's best to just execute this query natively on the database and fetch the results in PHP.&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Tue, 12 Oct 2010 12:59:05 GMT</pubDate><guid isPermaLink="false">New Post: Joining Objects 20101012125905P</guid></item><item><title>New Post: Joining Objects</title><link>http://phplinq.codeplex.com/Thread/View.aspx?ThreadId=230563</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I'm really at lost finding a solution to my problem. How do I transform this SQL to PHPLinq?&lt;/p&gt;
&lt;p&gt;SELECT *&lt;br&gt;FROM [dbo].[Customers] AS [t0]&lt;br&gt;WHERE [t0].[CustomerID] NOT IN (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [t1].[CustomerID]&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [dbo].[Orders] AS [t1]&lt;br&gt;)&lt;/p&gt;&lt;/div&gt;</description><author>iamdoods</author><pubDate>Tue, 12 Oct 2010 11:39:24 GMT</pubDate><guid isPermaLink="false">New Post: Joining Objects 20101012113924A</guid></item><item><title>New Post: Object Subcollection Help</title><link>http://phplinq.codeplex.com/Thread/View.aspx?ThreadId=222176</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Interested in these results :-)&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Mon, 20 Sep 2010 07:59:29 GMT</pubDate><guid isPermaLink="false">New Post: Object Subcollection Help 20100920075929A</guid></item><item><title>New Post: Object Subcollection Help</title><link>http://phplinq.codeplex.com/Thread/View.aspx?ThreadId=222176</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I stand corrected, Its fast, I had a bug in my code that it always&amp;nbsp; fetch from the db instead of fetching from the cache... People should use, phplinq, its so fast in getting 1000 - 5000 rows of in memory data, I tried it... Will post back more when that data goes 10000.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>macotamayo</author><pubDate>Fri, 17 Sep 2010 13:20:47 GMT</pubDate><guid isPermaLink="false">New Post: Object Subcollection Help 20100917012047P</guid></item><item><title>New Post: No valid PHPLinq_ILinqProvider found for the specified data source.</title><link>http://phplinq.codeplex.com/Thread/View.aspx?ThreadId=219462</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;That error happens when getting data not from an array, in your case this line '&amp;quot; &amp;nbsp;-&amp;gt;in('$events') &amp;quot;...&lt;/p&gt;
&lt;p&gt;Try removing the single&amp;nbsp;quotes around the&amp;nbsp;&amp;nbsp;event variable. It will work, if that happens again, then your loadEventsList() is not returning a collection object..&lt;/p&gt;&lt;/div&gt;</description><author>macotamayo</author><pubDate>Fri, 10 Sep 2010 15:44:39 GMT</pubDate><guid isPermaLink="false">New Post: No valid PHPLinq_ILinqProvider found for the specified data source. 20100910034439P</guid></item></channel></rss>