<?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: 40+ Useful Php tips for beginners &#8211; Part 3	</title>
	<atom:link href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Thu, 11 Oct 2018 01:30:10 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: EllisGL		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-168348</link>

		<dc:creator><![CDATA[EllisGL]]></dc:creator>
		<pubDate>Thu, 11 Oct 2018 01:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-168348</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65329&quot;&gt;Richard&lt;/a&gt;.

I&#039;ve taken that wrapper I talked about in 2012 and re-wrote it https://github.com/ellisgl/GeekLab-GLPDO2]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65329">Richard</a>.</p>
<p>I&#8217;ve taken that wrapper I talked about in 2012 and re-wrote it <a href="https://github.com/ellisgl/GeekLab-GLPDO2" rel="nofollow ugc">https://github.com/ellisgl/GeekLab-GLPDO2</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rodrigo Tognin		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-156241</link>

		<dc:creator><![CDATA[Rodrigo Tognin]]></dc:creator>
		<pubDate>Tue, 13 Mar 2018 20:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-156241</guid>

					<description><![CDATA[About the item 28 &quot;Store sessions in database&quot;, I have a serious problem to develop an free-of-errors application in this case: if I store logged users in a database to verify duplicate logins, may occurs the cpu/tablet reset with the user using the application, and the information about the user will stay on the database, and the user will not be able to login until the information be cleared. What´s the better way in this case? I have doubt if setting a time limit to disconnect users without activities after, for example, 10 minutes.
Sugestions?]]></description>
			<content:encoded><![CDATA[<p>About the item 28 &#8220;Store sessions in database&#8221;, I have a serious problem to develop an free-of-errors application in this case: if I store logged users in a database to verify duplicate logins, may occurs the cpu/tablet reset with the user using the application, and the information about the user will stay on the database, and the user will not be able to login until the information be cleared. What´s the better way in this case? I have doubt if setting a time limit to disconnect users without activities after, for example, 10 minutes.<br />
Sugestions?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: za_al		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65335</link>

		<dc:creator><![CDATA[za_al]]></dc:creator>
		<pubDate>Fri, 14 Dec 2012 15:36:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65335</guid>

					<description><![CDATA[the good MVC framework is Yii Framework.(http://www.yiiframework.com/)


Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.]]></description>
			<content:encoded><![CDATA[<p>the good MVC framework is Yii Framework.(<a href="http://www.yiiframework.com/" rel="nofollow ugc">http://www.yiiframework.com/</a>)</p>
<p>Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65334</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 19 Jul 2012 05:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65334</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65333&quot;&gt;Chris&lt;/a&gt;.

when running any php script from commandline, the full path should always be provided.
the full path should be set before hand inside the application somewhere.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65333">Chris</a>.</p>
<p>when running any php script from commandline, the full path should always be provided.<br />
the full path should be set before hand inside the application somewhere.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65333</link>

		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Thu, 19 Jul 2012 00:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65333</guid>

					<description><![CDATA[Thanks for sharing,  useful post. I like the number 34 approach and i use it a lot, but there is something that bugs me to end and I can&#039;t figure it out. Lets say the code is like:

exec(&quot;php-cli $path_to_file &#062; /dev/null 2&#062;/dev/null &#038;&quot;);

Some servers that are configured differently will require the full path to php binary for the shell command to work. How can I get that before hand to ensure compatibility?  (obviously asking the host is not possible)

Thanks.]]></description>
			<content:encoded><![CDATA[<p>Thanks for sharing,  useful post. I like the number 34 approach and i use it a lot, but there is something that bugs me to end and I can&#8217;t figure it out. Lets say the code is like:</p>
<p>exec(&#8220;php-cli $path_to_file &gt; /dev/null 2&gt;/dev/null &amp;&#8221;);</p>
<p>Some servers that are configured differently will require the full path to php binary for the shell command to work. How can I get that before hand to ensure compatibility?  (obviously asking the host is not possible)</p>
<p>Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matt		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65332</link>

		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sun, 22 Apr 2012 09:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65332</guid>

					<description><![CDATA[Very useful article, thanks!

Just one thing on #26: I think there&#039;s a typo on the variable in the query. It should be &quot;INSERT INTO {$table_name} ... &quot;]]></description>
			<content:encoded><![CDATA[<p>Very useful article, thanks!</p>
<p>Just one thing on #26: I think there&#8217;s a typo on the variable in the query. It should be &#8220;INSERT INTO {$table_name} &#8230; &#8220;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kenneth		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65331</link>

		<dc:creator><![CDATA[Kenneth]]></dc:creator>
		<pubDate>Thu, 19 Apr 2012 06:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65331</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65322&quot;&gt;Silver Moon&lt;/a&gt;.

&quot;all file browsers are can work with ftp:// urls making working on live server very easy.&quot;

If you&#039;re working on a live server you&#039;re doing it wrong. Use SVN :)

just my 2 cents as many people / beginners might read this. Need to give them good advice from the start ;)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65322">Silver Moon</a>.</p>
<p>&#8220;all file browsers are can work with ftp:// urls making working on live server very easy.&#8221;</p>
<p>If you&#8217;re working on a live server you&#8217;re doing it wrong. Use SVN :)</p>
<p>just my 2 cents as many people / beginners might read this. Need to give them good advice from the start ;)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: blacksonic		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65330</link>

		<dc:creator><![CDATA[blacksonic]]></dc:creator>
		<pubDate>Sat, 14 Apr 2012 17:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65330</guid>

					<description><![CDATA[Never ever turn on display errors in production, instead log those errors

Reading open source code is not always a good idea...look at wordpress, joomla, phpnuke...code is nearly piece of joke...so choose wisely which u read]]></description>
			<content:encoded><![CDATA[<p>Never ever turn on display errors in production, instead log those errors</p>
<p>Reading open source code is not always a good idea&#8230;look at wordpress, joomla, phpnuke&#8230;code is nearly piece of joke&#8230;so choose wisely which u read</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Richard		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65329</link>

		<dc:creator><![CDATA[Richard]]></dc:creator>
		<pubDate>Fri, 13 Apr 2012 13:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65329</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65328&quot;&gt;EllisGL&lt;/a&gt;.

You are right with the WHERE clauses for SELECT-Queries, but for INSERT-Queries, you don&#039;t realy need a where clause ;))

The issues with the table names are right, but it&#039;s one of the most important thinks by setting up a databse strukture without table names like that! 

To your wrapper:

I don&#039;t realy like Database Classes with queries like that. OOP is great, but I never got the point of this strange and big sql string adapters. Why should it be faster/easier/clearer to use

$objQuery-&#062;sql(&quot;SELECT *&quot;)-&#062;sql(&quot;FROM TABLE&quot;)-&#062;sql(&quot;WHERE foo=bar&quot;)?

Insteat of:

$strQuery = &quot;SELECT * FROM TABLE WHERE foo=bar&quot;;
$objQuery-&#062;sql($strQuery);

or

$objQuery-&#062;sql(&quot;SELECT * FROM TABLE WHERE foo=bar&quot;);

:))]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65328">EllisGL</a>.</p>
<p>You are right with the WHERE clauses for SELECT-Queries, but for INSERT-Queries, you don&#8217;t realy need a where clause ;))</p>
<p>The issues with the table names are right, but it&#8217;s one of the most important thinks by setting up a databse strukture without table names like that! </p>
<p>To your wrapper:</p>
<p>I don&#8217;t realy like Database Classes with queries like that. OOP is great, but I never got the point of this strange and big sql string adapters. Why should it be faster/easier/clearer to use</p>
<p>$objQuery-&gt;sql(&#8220;SELECT *&#8221;)-&gt;sql(&#8220;FROM TABLE&#8221;)-&gt;sql(&#8220;WHERE foo=bar&#8221;)?</p>
<p>Insteat of:</p>
<p>$strQuery = &#8220;SELECT * FROM TABLE WHERE foo=bar&#8221;;<br />
$objQuery-&gt;sql($strQuery);</p>
<p>or</p>
<p>$objQuery-&gt;sql(&#8220;SELECT * FROM TABLE WHERE foo=bar&#8221;);</p>
<p>:))</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: EllisGL		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65328</link>

		<dc:creator><![CDATA[EllisGL]]></dc:creator>
		<pubDate>Fri, 13 Apr 2012 12:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65328</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65325&quot;&gt;Richard&lt;/a&gt;.

@Richard: A couple issues with that. Your strKey and strTable are not back ticked and may cause issues, specially if you use table or column names like &quot;name&quot;. Also if you have a WHERE statements, you would have to deal with those. I use a PDO wrapper that allows me to do the following:

class Query_Tablename extends Db_Connect_Dbname
{
    public static function getSomethingFromTables($tablename_id = FALSE, $offset = 0, $limit = 10)
    {
        $SQL = self::statement();

        $SQL-&#062;sql(&#039;SELECT tn.*,&#039;)
            -&#062;sql(&#039;       tn2.cname&#039;)
            -&#062;sql(&#039;FROM   `tablename` tn&#039;)
            -&#062;sql(&#039;    JOIN `tbalename2` tn2&#039;)
            -&#062;sql(&#039;      ON tn2.tablename2_id = tn.tablename_id&#039;)
            -&#062;sql(&#039;WHERE  (0 = ? OR tn.tablename_id = ?)&#039;)-&#062;sBoolInt($tablename_id)-&#062;sInt($tablename_id)
            -&#062;sql(&#039;LIMIT ? OFFSET ?&#039;)-&#062;sInt($limit)-&#062;sInt($offset); // use sprintf() functionality, since I need to add the &quot;(int)&quot; stuff.

        //$SQL-&#062;dump();
        return self::selectMany($SQL);
    }
}


The wrapper (which isn&#039;t publicly available at this time and I haven&#039;t seen anything like it) does automatic binding, but has a couple issues I need to work out.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65325">Richard</a>.</p>
<p>@Richard: A couple issues with that. Your strKey and strTable are not back ticked and may cause issues, specially if you use table or column names like &#8220;name&#8221;. Also if you have a WHERE statements, you would have to deal with those. I use a PDO wrapper that allows me to do the following:</p>
<p>class Query_Tablename extends Db_Connect_Dbname<br />
{<br />
    public static function getSomethingFromTables($tablename_id = FALSE, $offset = 0, $limit = 10)<br />
    {<br />
        $SQL = self::statement();</p>
<p>        $SQL-&gt;sql(&#8216;SELECT tn.*,&#8217;)<br />
            -&gt;sql(&#8216;       tn2.cname&#8217;)<br />
            -&gt;sql(&#8216;FROM   `tablename` tn&#8217;)<br />
            -&gt;sql(&#8216;    JOIN `tbalename2` tn2&#8217;)<br />
            -&gt;sql(&#8216;      ON tn2.tablename2_id = tn.tablename_id&#8217;)<br />
            -&gt;sql(&#8216;WHERE  (0 = ? OR tn.tablename_id = ?)&#8217;)-&gt;sBoolInt($tablename_id)-&gt;sInt($tablename_id)<br />
            -&gt;sql(&#8216;LIMIT ? OFFSET ?&#8217;)-&gt;sInt($limit)-&gt;sInt($offset); // use sprintf() functionality, since I need to add the &#8220;(int)&#8221; stuff.</p>
<p>        //$SQL-&gt;dump();<br />
        return self::selectMany($SQL);<br />
    }<br />
}</p>
<p>The wrapper (which isn&#8217;t publicly available at this time and I haven&#8217;t seen anything like it) does automatic binding, but has a couple issues I need to work out.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65327</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 12 Apr 2012 10:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65327</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65326&quot;&gt;Jarrod&lt;/a&gt;.

agree with your point , and updated the post.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65326">Jarrod</a>.</p>
<p>agree with your point , and updated the post.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jarrod		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65326</link>

		<dc:creator><![CDATA[Jarrod]]></dc:creator>
		<pubDate>Thu, 12 Apr 2012 05:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65326</guid>

					<description><![CDATA[I don&#039;t think 31 is a very good idea, it may expose information you don&#039;t want exposed and it will make debugging things harder by only showing fatal errors. I would suggest:

  ini_set(&#039;display_errors&#039;, false);
  error_reporting(E_ALL);]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think 31 is a very good idea, it may expose information you don&#8217;t want exposed and it will make debugging things harder by only showing fatal errors. I would suggest:</p>
<p>  ini_set(&#8216;display_errors&#8217;, false);<br />
  error_reporting(E_ALL);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Richard		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65325</link>

		<dc:creator><![CDATA[Richard]]></dc:creator>
		<pubDate>Wed, 11 Apr 2012 16:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65325</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65320&quot;&gt;EllisGL&lt;/a&gt;.

Nice argument EllisGL, that&#039;s what I would like to add to this post.

You could build a function to your database class like this:

class MyDatabase {

[...]

    insert($strTable, $arData){
        if(!is_array($arData) OR count($arData) == 0)
            return false;

        $strInsertString = &quot;&quot;;
        foreach($arData as $strKey =&#062; $strValue)
            $strInsertString .= $strKey.&quot;=&#039;&quot;.$this-&#062;real_escape($strValue).&quot;&#039;,&quot;;
        $strInsertString = rtrim($strInsertString, &quot;,&quot;);
        return $this-&#062;query(&quot;INSERT INTO &quot;.$this-&#062;real_escape($strTable).&quot; SET &quot;.$strInsertString);
    }
}]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65320">EllisGL</a>.</p>
<p>Nice argument EllisGL, that&#8217;s what I would like to add to this post.</p>
<p>You could build a function to your database class like this:</p>
<p>class MyDatabase {</p>
<p>[&#8230;]</p>
<p>    insert($strTable, $arData){<br />
        if(!is_array($arData) OR count($arData) == 0)<br />
            return false;</p>
<p>        $strInsertString = &#8220;&#8221;;<br />
        foreach($arData as $strKey =&gt; $strValue)<br />
            $strInsertString .= $strKey.&#8221;='&#8221;.$this-&gt;real_escape($strValue).&#8221;&#8216;,&#8221;;<br />
        $strInsertString = rtrim($strInsertString, &#8220;,&#8221;);<br />
        return $this-&gt;query(&#8220;INSERT INTO &#8220;.$this-&gt;real_escape($strTable).&#8221; SET &#8220;.$strInsertString);<br />
    }<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65324</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 11 Apr 2012 14:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65324</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65323&quot;&gt;Phill Pafford&lt;/a&gt;.

backticks are the same as shell_exec]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65323">Phill Pafford</a>.</p>
<p>backticks are the same as shell_exec</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Phill Pafford		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65323</link>

		<dc:creator><![CDATA[Phill Pafford]]></dc:creator>
		<pubDate>Wed, 11 Apr 2012 13:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65323</guid>

					<description><![CDATA[On &quot;34. Make a portable function for executing shell commands&quot;, what about backticks? http://php.net/manual/en/language.operators.execution.php]]></description>
			<content:encoded><![CDATA[<p>On &#8220;34. Make a portable function for executing shell commands&#8221;, what about backticks? <a href="http://php.net/manual/en/language.operators.execution.php" rel="nofollow ugc">http://php.net/manual/en/language.operators.execution.php</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65322</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 11 Apr 2012 05:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65322</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65321&quot;&gt;Markus F&lt;/a&gt;.

Yes, there are plenty of good tools available on windows too , but linux does have some cool things.
All text editors on linux have code highlighting , all file browsers are can work with ftp:// urls making working on live server very easy.
The terminal is all powerful , with inbuilt ssh , and text editors to directly edit files on server.
File permission system is identical to that of server so problems are caught early , making the code move in the right direction.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65321">Markus F</a>.</p>
<p>Yes, there are plenty of good tools available on windows too , but linux does have some cool things.<br />
All text editors on linux have code highlighting , all file browsers are can work with ftp:// urls making working on live server very easy.<br />
The terminal is all powerful , with inbuilt ssh , and text editors to directly edit files on server.<br />
File permission system is identical to that of server so problems are caught early , making the code move in the right direction.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Markus F		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65321</link>

		<dc:creator><![CDATA[Markus F]]></dc:creator>
		<pubDate>Tue, 10 Apr 2012 15:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65321</guid>

					<description><![CDATA[&quot;Develop on Linux&quot; is just plain ... you know.
Most of the best tools are available for Windows too and im developing on Windows for years without problems.
Anyway it&#039;s true that most Webservers are running with Linux but there are very few issues (strict file names) that are causing problems.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Develop on Linux&#8221; is just plain &#8230; you know.<br />
Most of the best tools are available for Windows too and im developing on Windows for years without problems.<br />
Anyway it&#8217;s true that most Webservers are running with Linux but there are very few issues (strict file names) that are causing problems.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: EllisGL		</title>
		<link>https://www.binarytides.com/40-techniques-to-enhance-your-php-code-part-3/comment-page-1/#comment-65320</link>

		<dc:creator><![CDATA[EllisGL]]></dc:creator>
		<pubDate>Mon, 09 Apr 2012 13:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1693#comment-65320</guid>

					<description><![CDATA[On your MySQL query, I would use the &quot;INSERT INTO...SET&quot; way. This will allow to to quickly change the query into a UPDATE and also make it a lot easier to troubleshoot. Other things are to use back ticks around table and DB names.

INSERT INTO users(name , email , address , phone) VALUES(&#039;$name&#039; , &#039;$email&#039; , &#039;$address&#039; , &#039;$phone&#039;)&quot;;

would become:

INSERT INTO `users`
SET              `name` = &#039;$name&#039;,
                    `email` = &#039;$email&#039;,
                    `address` = &#039;$address&#039;,
                    `phone` = &#039;$phone&#039;;

Of course I wouldn&#039;t use this directly. I would use PDO parameterized queries to better protect against SQL injections.]]></description>
			<content:encoded><![CDATA[<p>On your MySQL query, I would use the &#8220;INSERT INTO&#8230;SET&#8221; way. This will allow to to quickly change the query into a UPDATE and also make it a lot easier to troubleshoot. Other things are to use back ticks around table and DB names.</p>
<p>INSERT INTO users(name , email , address , phone) VALUES(&#8216;$name&#8217; , &#8216;$email&#8217; , &#8216;$address&#8217; , &#8216;$phone&#8217;)&#8221;;</p>
<p>would become:</p>
<p>INSERT INTO `users`<br />
SET              `name` = &#8216;$name&#8217;,<br />
                    `email` = &#8216;$email&#8217;,<br />
                    `address` = &#8216;$address&#8217;,<br />
                    `phone` = &#8216;$phone&#8217;;</p>
<p>Of course I wouldn&#8217;t use this directly. I would use PDO parameterized queries to better protect against SQL injections.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
