<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7167438970388311665</id><updated>2024-08-28T05:27:49.251-07:00</updated><category term="PHP"/><category term="PHP QUESTIONS"/><category term="PHPMYADMIN"/><category term="JS"/><category term="LINUX"/><category term="LINUX QUESTIONS"/><category term="PYTHON"/><title type='text'>PHP: Hypertext Preprocessor</title><subtitle type='html'>PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-4545259262468794464</id><published>2021-03-22T03:31:00.000-07:00</published><updated>2021-03-22T03:31:03.685-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PYTHON"/><title type='text'>How to execute a python script from an html button</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;There are various ways to make it done, very simple technique with security peace in mind, here might help you&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1.&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;First you need to install&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Flask&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot; /&gt;&lt;code style=&quot;border-radius: 3px; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;pip install flask&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;in your command prompt, which is a python microframework, don&#39;t be afraid that you need to have another prior knowledge to learn that, it&#39;s really simple and just a few line of code.&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;If you wish you learn Flask quickly for complete novice here is the tutorial that I also learn from&amp;nbsp;&lt;a href=&quot;https://www.youtube.com/playlist?list=PL6gx4Cwl9DGDi9F_slcQK7knjtO8TUvUs&quot; rel=&quot;noreferrer&quot; style=&quot;border: 0px; box-sizing: inherit; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; user-select: auto; vertical-align: baseline;&quot;&gt;Flask Tutorial for beginner (YouTube)&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;2.Create a new folder&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;- 1st file will be&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;server.py&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;snippet-code-html lang-html s-code-block hljs xml&quot; style=&quot;border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;from flask import Flask, render_template
app = Flask(__name__)

@app.route(&#39;/&#39;)
def index():
  return render_template(&#39;index.html&#39;)

@app.route(&#39;/my-link/&#39;)
def my_link():
  print (&#39;I got clicked!&#39;)

  return &#39;Click.&#39;

if __name__ == &#39;__main__&#39;:
  app.run(debug=True)&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;snippet-code-html lang-html s-code-block hljs xml&quot; style=&quot;border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; white-space: normal;&quot;&gt;-2nd create another subfolder inside previous folder and name it as&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;templates&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; white-space: normal;&quot;&gt;&amp;nbsp;file will be your html file&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; white-space: normal;&quot; /&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;index.html&lt;/strong&gt;&lt;/pre&gt;&lt;pre class=&quot;snippet-code-html lang-html s-code-block hljs xml&quot; style=&quot;border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;&quot;&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;&lt;pre class=&quot;snippet-code-html lang-html s-code-block hljs xml&quot; style=&quot;background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 400; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-color: transparent; border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;hljs-meta&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;!doctype &lt;span class=&quot;hljs-meta-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;Test&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt; 
    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-attribute); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;utf-8&lt;/span&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/span&gt;My Website&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-attribute); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;action&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/my-link/&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-attribute); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-attribute); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Click me&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;form&lt;/span&gt;&amp;gt;&lt;/span&gt;
        
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-attribute); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/my-link/&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Click me&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;snippet-code-html lang-html s-code-block hljs xml&quot; style=&quot;background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 400; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;strong style=&quot;background-color: transparent; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;3.&lt;/strong&gt;&lt;span style=&quot;background-color: transparent; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: normal;&quot;&gt;. To run, open command prompt to the&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: transparent; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;New folder&lt;/em&gt;&lt;span style=&quot;background-color: transparent; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: normal;&quot;&gt;&amp;nbsp;directory, type&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--black-075); border-radius: 3px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;python server.py&lt;/code&gt;&lt;span style=&quot;background-color: transparent; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: normal;&quot;&gt;&amp;nbsp;to run the script, then go to browser type&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--black-075); border-radius: 3px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;localhost:5000&lt;/code&gt;&lt;span style=&quot;background-color: transparent; color: var(--highlight-color); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: normal;&quot;&gt;, then you will see button. You can click and route to destination script file you created.&lt;/span&gt;&lt;/pre&gt;&lt;/strong&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/4545259262468794464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2021/03/how-to-execute-python-script-from-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4545259262468794464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4545259262468794464'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2021/03/how-to-execute-python-script-from-html.html' title='How to execute a python script from an html button'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-8907480608863241707</id><published>2020-10-08T03:35:00.006-07:00</published><updated>2020-10-08T03:35:59.736-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Generate data format from current date to x months</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Consolas; font-size: 9.8pt; font-style: italic;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;font-family: Consolas; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; * Generate data format from current date to x months&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; *&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;@param &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;$months&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;*&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;@return &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;DateTime|string&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; *&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;@throws &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Exception&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; */&lt;br /&gt;&lt;/span&gt;function generateDateByMonths($months)&lt;br /&gt;{&lt;br /&gt;    $date = &#39;&#39;;&lt;br /&gt;    $time = &#39;23:59:59&#39;;&lt;br /&gt;    if(is_numeric($months) &amp;amp;&amp;amp; $months &amp;gt; 0) {&lt;br /&gt;        $date = new DateTime(&#39;now&#39;);&lt;br /&gt;        $date-&amp;gt;modify(&#39;+&#39;.$months.&#39; month&#39;); // or you can use &#39;-2 months&#39; for deduct&lt;br /&gt;        $date = $date-&amp;gt;format(&#39;Y-m-d&#39;);&lt;br /&gt;    }&lt;br /&gt;    return $date . &#39; &#39; . $time;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/8907480608863241707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2020/10/generate-data-format-from-current-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/8907480608863241707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/8907480608863241707'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2020/10/generate-data-format-from-current-date.html' title='Generate data format from current date to x months'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-7637144561418771196</id><published>2020-03-03T05:36:00.002-08:00</published><updated>2020-03-03T05:36:38.281-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JS"/><title type='text'>JavaScript: remove duplicate in multidimensional array by using specific key</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;function removeDuplicatesMulti(array) {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Declare a new array&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var newArray = [];&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Declare an empty object&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var uniqueObject = {};&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Loop for the array elements&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for (var i in array) {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// Extract the title or key based on duplicate finding&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;objTitle = array[i][&#39;ID&#39;];&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// Use the title as the index&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;uniqueObject[objTitle] = netSerices[i];&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Loop to push unique object into array&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for (i in uniqueObject) {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;newArray.push(uniqueObject[i]);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return newArray;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/7637144561418771196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-remove-duplicate-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/7637144561418771196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/7637144561418771196'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-remove-duplicate-in.html' title='JavaScript: remove duplicate in multidimensional array by using specific key'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-1040318323128552526</id><published>2020-03-03T05:33:00.002-08:00</published><updated>2020-03-03T05:33:49.752-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JS"/><title type='text'>JavaScript finding intersection values from the 2 arrays</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
function arrayIntersection(ar1, ar2) {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return ar1.filter(function(n) {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return ar2.indexOf(n) !== -1;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;});&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/1040318323128552526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-finding-intersection-values.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1040318323128552526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1040318323128552526'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-finding-intersection-values.html' title='JavaScript finding intersection values from the 2 arrays'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-5833226209370435815</id><published>2020-03-03T05:31:00.001-08:00</published><updated>2020-03-03T05:31:22.873-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JS"/><title type='text'>JavaScript function to remove duplicates in single dimension array</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
function removeDuplicatesInSingleDimensionArray(array) {&lt;br /&gt;
&amp;nbsp; return array.filter((a, b) =&amp;gt; array.indexOf(a) === b)&lt;br /&gt;
};&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/5833226209370435815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-function-to-remove.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5833226209370435815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5833226209370435815'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2020/03/javascript-function-to-remove.html' title='JavaScript function to remove duplicates in single dimension array'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-5678168216297276493</id><published>2019-02-02T04:48:00.000-08:00</published><updated>2019-02-02T04:50:29.872-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JS"/><title type='text'>Tips To Improve JavaScript Performance</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #1 – Evaluate Local Variables&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://blogs.msdn.com/b/ie/archive/2006/08/28/728654.aspx&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://blogs.msdn.com/b/ie/archive/2006/08/28/728654.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Primarily, specific to IE, because local variables are found based on the most to the least specific scope and can pass through multiple levels of scope, the look-ups can result in generic queries. When defining the function scope, within a local variable without a preceding var declaration, it is important to precede each variable with var in order to define the current scope in order to prevent the look-up and to speed up the code.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #2 – Create shortcut codes to speed up coding&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;For useful codes that are constantly being used, speeding up the coding process can be achieved by creating shortcuts for longer codes, for example, document.getElementById. By creating a shortcut, longer scripts will not take as long to code and will save time in the overall process.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #3 –Manipulate element fragments before adding them to DOM&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.jquery4u.com/dom-modification/improve-javascript-performance&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.jquery4u.com/dom-modification/improve-javascript-performance&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Before placing the elements to the DOM, ensure that all tweaks have been performed in order to improve JavaScript performance. This will eliminate the need to set aside Prepend or Append jQuery APIs.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #4 – Save bytes by using Minification&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://sixrevisions.com/web-development/10-ways-to-improve-your-web-page-performance&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://sixrevisions.com/web-development/10-ways-to-improve-your-web-page-performance&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Reduce the file size of your JavaScript documents by removing characters (tabs, source code documents, spaces etc.) without changing the functionality of the file.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;There are a number of minification tools that can assist in this process, and have the ability to reverse the minification. Minification is the process of removing all unnecessary characters from source code, without changing its functionality.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #5 –Don’t use nested loops if not required&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Avoid unwanted loops, such as for/while, in order to keep the JavaScript linear and to prevent from having to go through thousands of objects. Unwanted loops can cause the browser to work harder to process the codes and can slow down the process.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #6 – Cache objects to increase performance&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Many times, scripts will be repeatedly used to access a certain object. By storing a repeated access object inside a user defined variable, as well as using a variable in subsequent references to that object, performance improvement can be achieved immediately.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #7 – Use a .js file to cache scripts&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.javascriptkit.com/javatutors/efficientjs.shtml&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.javascriptkit.com/javatutors/efficientjs.shtml&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;By using this technique, increased performance can be achieved because it allows the browser to load the script once and will only recall it from cache should the page be reloaded or revisited.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #8 – Place JavaScript at the bottom of the page&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Placing the scripts as low as possible in the page will increase the rendering progress, and also increase download parallelization. The result is that the page will seem to load faster, and in some cases it can also save on the total amount of code needed.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #9 – Use jQuery as a framework&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Used for the scripting of HTML, jQuery is an easy to use JavaScript library that can help to speed up any website. jQuery provides a large number of plug-ins that can quickly be used, by even novice programmers.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #10 – Compress your files with GZip&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://blogs.msdn.com/b/ie/archive/2006/08/28/728654.aspx&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://devmoose.com/coding/10-ways-to-instantly-speed-up-your-website&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GZip can reduce a JavaScript file considerably, saving bandwidth, and accelerate the response time. JavaScript files can be very large, and without compression, it can bog down any website. Smaller files provide a faster and more satisfying web experience.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #11- Don’t use “With” keyword&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://blogs.msdn.com/b/ie/archive/2006/08/28/728654.aspx&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://blogs.msdn.com/b/ie/archive/2006/08/28/728654.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;The “With” keyword is considered a black-sheep because it suffers from several flaws that can be very frustrating. Although it makes the process of working with local properties simpler, “With” can make looking up variables in other scopes more expensive.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #12 – Minimize requests for HTTP&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.websiteoptimization.com/speed/tweak/http&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.websiteoptimization.com/speed/tweak/http&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Minimize HTTP requests to render pages by combining external files and including JavaScript directly within XHTML pages. Each time a unique HTTP takes a trip to a server, the result is a large number of delays.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #13 – Implement Event Delegation&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;With Event Delegation, it becomes easier to use a single event handler to manage a type of event for the entire page. Without using Event Delegation, large web applications can grind to a halt because of too many event handlers. Benefits of Event Delegation include; less functionality to manage, fewer ties between code and DOM, and less memory required to process.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #14 – Don’t use the same script twice&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.abhishekbharadwaj.com/2010/12/speed-up-your-website-avoid-duplicate-scripts&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.abhishekbharadwaj.com/2010/12/speed-up-your-website-avoid-duplicate-scripts&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Duplicate scripts will have a significant impact on performance. Duplicate scripts will create unnecessary requests on HTTP, especially in the IE browser. Using a SCRIPT tag, in an HTML page, will help to avoid accidentally duplicating scripts.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #15 – Remove Double Dollar $$&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.mellowmorning.com/2008/05/18/javascript-optimization-high-performance-js-apps&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.mellowmorning.com/2008/05/18/javascript-optimization-high-performance-js-apps&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Using “double dollar $$” function is not necessarily needed, when it comes to improving the speed of a website.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #16 – Creating reference variables&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;https://mondaybynoon.com/a-couple-of-quick-tips-for-javascript-optimization/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://mondaybynoon.com/2009/04/27/a-couple-of-quick-tips-for-javascript-optimization&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;When working with a specific node repeatedly, it is best to define a variable with that particular note, instead of switching to it repeatedly. This is not a significant enhancement but it can have a bigger impact on a large scale.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #17 – Increase speed of Object Detection&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://dean.edwards.name/weblog/2005/12/js-tip1&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dean.edwards.name/weblog/2005/12/js-tip1&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;A more efficient method to using Object Detection is to use a code created dynamically based off of object detection, rather than performing object detection inside of a function.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #18 – Write effective Loops&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;https://robertnyman.com/2008/04/11/javascript-loop-performance/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://robertnyman.com/2008/04/11/javascript-loop-performance&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Depending on the browser, the method used to write Loops can have a great effect on the performance of a site. Improper writing of loops can slow down pages with lots of queries and running a number of loops in parallel.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #19 – Shorten Scope Chains&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Global scopes can be slow, because each time a function executes, it cause a temporary calling scope to be created. JavaScript searchers for the first item in the scope chain, and if it doesn’t find the variable, it swells up the chain until it hits the global object.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #20 – Index directly to NodeLists&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;NodeLists are live and can take up a lot of memory, as they are updated when an underlying document changes. Its quicker to index directly into a list, as a browser will not need to create a node list object.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #21 – Don’t use ‘eval’&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Although the “eval” function is a good method to run arbitrary code, each string that is passed to the eval function has to be parsed and executed on-the-fly. This cost has to be paid every time the execution reaches an eval function call.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #22 – Use Function Inlining&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;https://dl.acm.org/citation.cfm?id=844097&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;https://dl.acm.org/citation.cfm?id=844097&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Function Inlining helps to eliminate call costs, and replaces a function call with the body of the called function. In JavaScript, performing a function call is an expensive operation because it takes several preparatory steps to perform: allocating space for parameters, copying the parameters, and resolving the function name.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #23 – Implement Common Sub-expression Elimination (CSE)&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://sunilkumarn.wordpress.com/2010/10/19/common-subexpression-elimination-cse&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://sunilkumarn.wordpress.com/2010/10/19/common-subexpression-elimination-cse&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Common sub-expression elimination (CSE) is a performance-targeted compiler optimization technique that searches for instances of identical expressions and replaces them with a single variable holding the computed value. You can expect that using a single local variable for a common sub-expression will always be faster than leaving the code unchanged.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #24 – Build DOM node and all its sub-nodes offline&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;When adding complex content such as tables to a site, performance is improved by adding complex sub-trees offline.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #25 – Try not to use global variables&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Because the scripting engine needs to look through the scope, when referencing global variables from within function or another scope, the variable will be destroyed when the local scope is lost. If variables in global scope cannot persist through the lifetime of the script, the performance will be improved.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #26 – Use primitive functions operations vs. function calls&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Improved speed can be achieved in performance critical loops and functions by using equivalent primitive functions instead of function calls.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #27 – Don’t retain alive references of other documents&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/efficient-javascript/?page=4#docreferences&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.opera.com/articles/view/efficient-javascript/?page=4#docreferences&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;By not retaining alive references of other documents after the script has finished with them, faster performance will be achieved. This is because any references to those objects from that document are not to be kept in its entire DOM tree, and the scripting environment will not be kept alive in RAM. Thus the document itself is no longer loaded.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #28 – Use XMLHttpRequest&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/efficient-javascript/?page=4#docreferences&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.opera.com/articles/view/efficient-javascript/?page=4#docreferences&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;XMLHttpRequest helps to reduce the amount of content coming from the server, and avoids the performance impact of destroying and recreating the scripting environment in between page loads. Its is important to ensure that XMLHttpRequest is supported, or otherwise it can lead to problems and confusion.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #29 – Avoid using try-catch-finally&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/efficient-javascript/?page=2&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.opera.com/articles/view/efficient-javascript/?page=2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Whenever the catch clause is executed, where the caught exception object is assigned to a variable, “try-catch-finally” creates a new variable in the current scope at runtime. A number of browsers do not handle this process efficiently because the variable is created and destroyed at runtime. Avoid it!&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; clear: both; color: #646d7d; font-family: Arial, Helvetica, sans-serif; font-size: 1.5rem; line-height: 1.5; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/h1&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; color: #36393f; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; font-size: 14pt; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tip #30 – Don’t misuse for-in&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/efficient-javascript/?page=2&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #2a96c8; margin: 0px; outline: none; padding: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: 0px; color: #000099; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.opera.com/articles/view/efficient-javascript/?page=2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #5b606a; font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-left: 18pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: black; font-family: &amp;quot;arial&amp;quot;; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Because the “for-in” loop requires the script engine to build a list of all the enumerable properties, coding inside for loop does not modify the array. It iterates pre-compute the length of the array into a variable len inside for loop scope.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/5678168216297276493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2019/02/tips-to-improve-javascript-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5678168216297276493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5678168216297276493'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2019/02/tips-to-improve-javascript-performance.html' title='Tips To Improve JavaScript Performance'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-1006454472758342811</id><published>2012-06-12T04:39:00.001-07:00</published><updated>2012-06-12T04:39:41.561-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Php isset</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;refnamediv&quot;&gt;

  &lt;h1 class=&quot;refname&quot;&gt;
isset&lt;/h1&gt;
&lt;div class=&quot;verinfo&quot;&gt;
(PHP 4, PHP 5)&lt;/div&gt;
&lt;div class=&quot;refpurpose&quot;&gt;
&lt;span class=&quot;refname&quot;&gt;isset&lt;/span&gt; — &lt;span class=&quot;dc-title&quot;&gt;Determine if a variable is set and is not &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;refpurpose&quot;&gt;
&lt;span class=&quot;dc-title&quot;&gt;&lt;strong&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;refpurpose&quot;&gt;
&lt;span class=&quot;dc-title&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;refsect1 description&quot; id=&quot;refsect1-function.isset-description&quot;&gt;
&lt;h3 class=&quot;title&quot;&gt;
&lt;a class=&quot;toggler shown&quot; href=&quot;http://www.php.net/manual/en/function.isset.php#&quot;&gt;&lt;img alt=&quot;reject note&quot; src=&quot;http://www.php.net/images/notes-reject.gif&quot; /&gt;&lt;/a&gt; Description&lt;/h3&gt;
&lt;div class=&quot;methodsynopsis dc-description&quot;&gt;

   &lt;span class=&quot;type&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;methodname&quot;&gt;&lt;strong&gt;isset&lt;/strong&gt;&lt;/span&gt;
    ( &lt;span class=&quot;methodparam&quot;&gt;&lt;span class=&quot;type&quot;&gt;&lt;a class=&quot;type mixed&quot; href=&quot;http://www.php.net/manual/en/language.pseudo-types.php#language.types.mixed&quot;&gt;mixed&lt;/a&gt;&lt;/span&gt; &lt;code class=&quot;parameter&quot;&gt;$var&lt;/code&gt;&lt;/span&gt;
   [, &lt;span class=&quot;methodparam&quot;&gt;&lt;span class=&quot;type&quot;&gt;&lt;a class=&quot;type mixed&quot; href=&quot;http://www.php.net/manual/en/language.pseudo-types.php#language.types.mixed&quot;&gt;mixed&lt;/a&gt;&lt;/span&gt; &lt;code class=&quot;parameter&quot;&gt;$...&lt;/code&gt;&lt;/span&gt;
  ] )&lt;/div&gt;
&lt;div class=&quot;para rdfs-comment&quot;&gt;

   Determine if a variable is set and is not &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt;.
  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;

   If a variable has been unset with &lt;span class=&quot;function&quot;&gt;&lt;a class=&quot;function&quot; href=&quot;http://www.php.net/manual/en/function.unset.php&quot;&gt;unset()&lt;/a&gt;&lt;/span&gt;, it will no
   longer be set. &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;isset()&lt;/strong&gt;&lt;/span&gt; will return &lt;strong&gt;&lt;code&gt;FALSE&lt;/code&gt;&lt;/strong&gt; if testing a
   variable that has been set to &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt;. Also note that a &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt; byte
   (&lt;em&gt;&quot;\0&quot;&lt;/em&gt;) is not equivalent to the PHP &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt; constant.
  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;

   If multiple parameters are supplied then &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;isset()&lt;/strong&gt;&lt;/span&gt; will
   return &lt;strong&gt;&lt;code&gt;TRUE&lt;/code&gt;&lt;/strong&gt; only if all of the parameters are set. Evaluation goes from
   left to right and stops as soon as an unset variable is encountered.
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 parameters&quot; id=&quot;refsect1-function.isset-parameters&quot;&gt;
&lt;div class=&quot;reportbug&quot;&gt;
&lt;a href=&quot;https://bugs.php.net/report.php?bug_type=Documentation+problem&amp;amp;manpage=function.isset%23refsect1-function.isset-parameters&quot;&gt;Report a bug&lt;/a&gt;&lt;/div&gt;
&lt;h3 class=&quot;title&quot;&gt;
&lt;a class=&quot;toggler shown&quot; href=&quot;http://www.php.net/manual/en/function.isset.php#&quot;&gt;&lt;img alt=&quot;reject note&quot; src=&quot;http://www.php.net/images/notes-reject.gif&quot; /&gt;&lt;/a&gt; Parameters&lt;/h3&gt;
&lt;div class=&quot;para&quot;&gt;

   &lt;/div&gt;
&lt;dl&gt;
&lt;dt&gt;

     &lt;span class=&quot;term&quot;&gt;&lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;var&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;
     &lt;/dt&gt;
&lt;dd&gt;

      &lt;div class=&quot;para&quot;&gt;

       The variable to be checked.
      &lt;/div&gt;
&lt;/dd&gt;
&lt;dt&gt;

     &lt;span class=&quot;term&quot;&gt;&lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;...&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;
     &lt;/dt&gt;
&lt;dd&gt;

      &lt;div class=&quot;para&quot;&gt;

       Another variable ...
      &lt;/div&gt;
&lt;/dd&gt;

    

   &lt;/dl&gt;
&lt;br /&gt;

 &lt;/div&gt;
&lt;div class=&quot;refsect1 returnvalues&quot; id=&quot;refsect1-function.isset-returnvalues&quot;&gt;
&lt;div class=&quot;reportbug&quot;&gt;
&lt;a href=&quot;https://bugs.php.net/report.php?bug_type=Documentation+problem&amp;amp;manpage=function.isset%23refsect1-function.isset-returnvalues&quot;&gt;Report a bug&lt;/a&gt;&lt;/div&gt;
&lt;h3 class=&quot;title&quot;&gt;
&lt;a class=&quot;toggler shown&quot; href=&quot;http://www.php.net/manual/en/function.isset.php#&quot;&gt;&lt;img alt=&quot;reject note&quot; src=&quot;http://www.php.net/images/notes-reject.gif&quot; /&gt;&lt;/a&gt; Return Values&lt;/h3&gt;
&lt;div class=&quot;para&quot;&gt;

   Returns &lt;strong&gt;&lt;code&gt;TRUE&lt;/code&gt;&lt;/strong&gt; if &lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;var&lt;/code&gt;&lt;/em&gt; exists and has value other
   than &lt;strong&gt;&lt;code&gt;NULL&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;FALSE&lt;/code&gt;&lt;/strong&gt; otherwise.
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 changelog&quot; id=&quot;refsect1-function.isset-changelog&quot;&gt;
&lt;div class=&quot;reportbug&quot;&gt;
&lt;a href=&quot;https://bugs.php.net/report.php?bug_type=Documentation+problem&amp;amp;manpage=function.isset%23refsect1-function.isset-changelog&quot;&gt;Report a bug&lt;/a&gt;&lt;/div&gt;
&lt;h3 class=&quot;title&quot;&gt;
&lt;a class=&quot;toggler shown&quot; href=&quot;http://www.php.net/manual/en/function.isset.php#&quot;&gt;&lt;img alt=&quot;reject note&quot; src=&quot;http://www.php.net/images/notes-reject.gif&quot; /&gt;&lt;/a&gt; Changelog&lt;/h3&gt;
&lt;div&gt;
&lt;table class=&quot;doctable informaltable&quot;&gt;&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Version&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody class=&quot;tbody&quot;&gt;
&lt;tr&gt;&lt;td&gt;5.4.0&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;para&quot;&gt;
Checking non-numeric offsets of strings now returns&amp;nbsp;&lt;strong&gt;&lt;code&gt;FALSE&lt;/code&gt;&lt;/strong&gt;.&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4869&quot;&gt;

    &lt;strong&gt;Example #1 &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;isset()&lt;/strong&gt;&lt;/span&gt; Examples&lt;/strong&gt;&lt;br /&gt;

    &lt;div class=&quot;example-contents&quot;&gt;

&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$var&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;This&amp;nbsp;will&amp;nbsp;evaluate&amp;nbsp;to&amp;nbsp;TRUE&amp;nbsp;so&amp;nbsp;the&amp;nbsp;text&amp;nbsp;will&amp;nbsp;be&amp;nbsp;printed.&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if&amp;nbsp;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;))&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;This&amp;nbsp;var&amp;nbsp;is&amp;nbsp;set&amp;nbsp;so&amp;nbsp;I&amp;nbsp;will&amp;nbsp;print.&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;In&amp;nbsp;the&amp;nbsp;next&amp;nbsp;examples&amp;nbsp;we&#39;ll&amp;nbsp;use&amp;nbsp;var_dump&amp;nbsp;to&amp;nbsp;output&lt;br /&gt;//&amp;nbsp;the&amp;nbsp;return&amp;nbsp;value&amp;nbsp;of&amp;nbsp;isset().&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;test&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$b&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;anothertest&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;TRUE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;TRUE&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;unset&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$foo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;?&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
This also work for elements in arrays:&lt;/div&gt;
&lt;div class=&quot;informalexample&quot;&gt;

    &lt;div class=&quot;example-contents&quot;&gt;

&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;array&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;test&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;hello&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;pie&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;array(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;a&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;apple&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;test&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;TRUE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;foo&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;br /&gt;&lt;br /&gt;//&amp;nbsp;The&amp;nbsp;key&amp;nbsp;&#39;hello&#39;&amp;nbsp;equals&amp;nbsp;NULL&amp;nbsp;so&amp;nbsp;is&amp;nbsp;considered&amp;nbsp;unset&lt;br /&gt;//&amp;nbsp;If&amp;nbsp;you&amp;nbsp;want&amp;nbsp;to&amp;nbsp;check&amp;nbsp;for&amp;nbsp;NULL&amp;nbsp;key&amp;nbsp;values&amp;nbsp;then&amp;nbsp;try:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;array_key_exists&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;TRUE&lt;br /&gt;&lt;br /&gt;//&amp;nbsp;Checking&amp;nbsp;deeper&amp;nbsp;array&amp;nbsp;values&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;pie&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;][&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;TRUE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;pie&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;][&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;cake&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;][&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;][&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//&amp;nbsp;FALSE&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;?&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4870&quot;&gt;

   &lt;strong&gt;Example #2 &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;isset()&lt;/strong&gt;&lt;/span&gt; on String Offsets&lt;/strong&gt;&lt;br /&gt;

   &lt;div class=&quot;example-contents&quot;&gt;

    PHP 5.4 changes how &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;isset()&lt;/strong&gt;&lt;/span&gt; behaves
    when passed string offsets.
   &lt;/div&gt;
&lt;div class=&quot;example-contents&quot;&gt;

&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&amp;lt;?php&lt;br /&gt;$expected_array_got_string&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;somestring&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;some_key&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;0&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;0.5&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(isset(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$expected_array_got_string&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;0&amp;nbsp;Mostel&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]));&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;?&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example-contents&quot;&gt;
Output of the above example in PHP 5.3:&lt;/div&gt;
&lt;div class=&quot;example-contents screen&quot;&gt;

&lt;div class=&quot;cdata&quot;&gt;
&lt;pre&gt;bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example-contents&quot;&gt;
Output of the above example in PHP 5.4:&lt;/div&gt;
&lt;div class=&quot;example-contents screen&quot;&gt;

&lt;div class=&quot;cdata&quot;&gt;
&lt;pre&gt;bool(false)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;

   &lt;/div&gt;
&lt;table class=&quot;doctable informaltable&quot;&gt;
    
     &lt;thead&gt;
&lt;tr&gt;
       &lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;br /&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody class=&quot;tbody&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;para&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/1006454472758342811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/06/php-isset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1006454472758342811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1006454472758342811'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/06/php-isset.html' title='Php isset'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-2865939695776954596</id><published>2012-05-04T06:35:00.000-07:00</published><updated>2012-05-04T06:35:14.414-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX QUESTIONS"/><title type='text'>Linux interview questions 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What are the process states in Linux?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Process states in Linux:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Running:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;
Process is either running or ready to run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Interruptible&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;: a
Blocked state of a process and waiting for an event or signal from another
process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Uninterruptible&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;:-&amp;nbsp; a blocked state. Process waits for a hardware
condition and cannot handle any signal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Stopped:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;
Process is stopped or halted and can be restarted by some other process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Zombie:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;
process terminated, but information is still there in the process table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
What is a zombie?&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Zombie is a process state when
the child dies before the parent process. In this case the structural
information of the process is still in the process table. Since this process is
not alive, it cannot react to signals. Zombie state can finish when the parent
dies. All resources of the zombie state process are cleared by the kernel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Explain each system calls used for process management in
linux. &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;System
calls used for Process management:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Fork ()
:- &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Used to create a new process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Exec()
:- &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Execute a new program&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Wait&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;():-
wait until the process finishes execution&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Exit():-
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Exit from the process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Getpid():-
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;get the unique process id of the process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Getppid():-
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;get the parent process unique id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Nice():-
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;to bias the existing property of process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/2865939695776954596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/2865939695776954596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/2865939695776954596'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-3.html' title='Linux interview questions 3'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-6789645467504296494</id><published>2012-05-04T06:33:00.000-07:00</published><updated>2012-05-04T06:35:23.455-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX QUESTIONS"/><title type='text'>Linux interview questions 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What does nslookup do? Explain its&amp;nbsp;two modes.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Nslookup is used to find
details related to a Domain name server. Details like IP addresses of a
machine, MX records, servers etc. It sends a domain name query packet to the
corresponding DNS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Nslookup has two modes.
Interactive and non interactive. Interactive mode allows the user to interact
by querying information about different hosts and domains.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Non interactive mode is used to
fetch information about the specified host or domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Interactive mode:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Nslookup [options] [server]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
What is Bash Shell?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Bash is a free shell for UNIX.
It is the default shell for most UNIX systems. It has a combination of the C
and Korn shell features.&amp;nbsp; Bash shell is
not portable. any Bash-specific feature will not function on a system using the
Bourne shell or one of its replacements, unless bash is installed as a
secondary shell and the script begins with #!/bin/bash. It supports regular and
expressions. When bash script starts, it executes commands of different
scripts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Explain Some Network-Monitoring Tools in Linux: ping,
traceroute, tcpdump, ntop&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Network monitoring tools are
used to monitor the network, systems present on the network, traffic etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;st1:place w:st=&quot;on&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Ping&lt;/span&gt;&lt;/b&gt;&lt;/st1:place&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;: &lt;st1:place w:st=&quot;on&quot;&gt;Ping&lt;/st1:place&gt; command is used to check if the system is in the
network or not. To check if the host is operating. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;e.g. ping ip_address&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;When the command is executed,
it returns a detailed summary of the host. Packets&amp;nbsp;&amp;nbsp; sent, received, lost by estimating the round
trip time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Traceroute&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; : the
command is used to trace the path taken by the packet across a network. Tracing
the path here means finding out the hosts visited by the packet to reach its
destination. This information is useful in debugging. Roundtrip time in ms is
shown for every visit to a host.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Tcpdump&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;commonly
used to monitor network traffic. Tcdump captures and displays packet headers
and matching them against criteria or all. It interprets Boolean operators and
accepts host names, ip address, network names as arguments. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Ntop&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; :
Network top shows the network usage. It displays summary of network usage by
machines on the network in a format as of UNIX top utility. It can also be run
in web mode, which allows the display to be browsed with a web browser. It can
display network traffic statistics, identify host etc. Interfaces are available
to view such information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Explain
file system of linux. The root &quot;/&quot; filesystem, /usr filesystem, /var
filesystem, /home filesystem, /proc filesystem.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Root
&quot;/&quot; file system: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The kernel needs a root file system to
mount at start up. The root file system is generally small and should not be
changed often as it may interrupt in booting. The root directory usually does
not have the critical files. Instead sub directories are created. E.g. /bin
(commands needed during bootup), /etc (config files) , /lib(shared libraries).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;/usr&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;filesystem&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; : &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;this file system is generally
large as it contains the executable files to be shared amongst different
machines. Files are usually the ones installed while installing Linux. This
makes it possible to update the system from a new version of the distribution,
or even a completely new distribution, without having to install all programs
again. Sub directories include /bin, /include, /lib, /local (for local
executables)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;/var
filesystem&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; : &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;this file system is specific to local
systems. It is called as var because the data keeps changing. The sub
directories include /cache/man (A cache for man pages), /games (any variable
data belong to games), /lib (files that change), /log (log from different
programs), /tmp (for temporary files)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;/home
filesystem: - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;this file system differs from host to host. User specific
configuration files for applications are stored in the user&#39;s home directory in
a file. UNIX creates directories for all users directory. E.g /home/my_name.
Once the user is logged in ; he is placed in his home directory. &lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;/proc filesystem&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; :&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;this file system does&amp;nbsp; not exist on the hard disk. It is created by the kernel in its memory to provide information about the system. This information is usually about the processes. Contains a hierarchy of special files which represent the current state of the kernel .Few of the Directories include /1 (directory with information about process num 1, where 1 is the identification number), /cpuinfo (information about cpu), /devices (information about devices installed), /filesystem (file systems configured), /net (information about network protocols), /mem (memory usage)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/6789645467504296494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6789645467504296494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6789645467504296494'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-2.html' title='Linux interview questions 2'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-6592269319986111794</id><published>2012-05-04T06:30:00.000-07:00</published><updated>2012-05-04T06:35:23.448-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX QUESTIONS"/><title type='text'>Linux interview questions 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What is Kernel? Explain the task it performs.&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Kernel is used in UNIX like
systems and is considered to be the heart of the operating system. It is
responsible for communication between hardware and software components. It is
primarily used for managing the systems resources as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Kernel Activities:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The Kernel task manager allows
tasks to run concurrently.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Managing the computer resources: Kernel allows the other programs
to run and use the resources&lt;br /&gt;
&lt;br /&gt;
Resources include i/o devices, CPU, memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Kernel is responsible for
Process management. It allows multiple processes to run simultaneously allowing
user to multitask. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Kernel has an access to the systems
memory and allows the processes to access the memory when required. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Processes may also need to
access the devices attached to the system. Kernel assists the processes in
doing so.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;For the processes to access and
make use&lt;b&gt; &lt;/b&gt;of these services, system calls
are used. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What is Linux Shell? What is Shell Script?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Linux shell is a user interface
used for executing the commands. Shell is a program the user uses for executing
the commands. In UNIX, any program can be the users shell. Shell categories in
Linux are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Bourne shell compatible, C
shell compatible, &lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;nontraditional, and
historical&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;A shell script, as the name
suggests, is a script written for the shell. Script here means a programming
language used to control the application. The shell script allows different
commands entered in the shell to be executed. Shell script is easy to debug,
quicker as compared to writing big programs. However the execution speed is
slow because it launches a new process for every shell command executed.
Examples of commands are cp, cn, cd. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What are Pipes? Explain uses of pipes.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;A pipe is a chain of processes
so that output of one process (stdout) is fed an input (stdin) to another. UNIX
shell has a special syntax for creation of pipelines. The commands are written
in sequence separated by |. Different filters are used for Pipes like AWK,
GREP. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;e.g. sort file | lpr ( sort the file and send it to printer)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Uses of Pipe&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Several powerful functions can be in a single statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Streams of processes can be redirected to user specified locations
using &amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
Explain trap command; shift Command, getopts command of linux.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Trap command&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;:
controls the action to be taken by the shell when a signal is received. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Trap [OPTIONS] [ [arg]
signspec..]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Arg is the action to be taken
or executed on receiving a signal specified in signspec.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;e.g. trap “rm $FILE; exit” //
exit (signal) and remove file (action)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Shift&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Command:&amp;nbsp;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Using shift command, command line arguments can be accessed. The
command causes the positional parameters shift to the left. Shift [n] where n
defaults to 1. It is useful when several parameters need to be tested.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Getopts
command&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;: this command is used to parse arguments passed. It examines the
next command line argument and determines whether it is a valid option&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Getopts {optstring} {variable1}.
Here, optsring contains letters to be recognized if a letter is followed by a
colon, an argument should be specified. E.g (whether the argument begins with a
minus sign and is followed by any single letter contained inside &lt;i&gt;options&lt;/i&gt;
) If not, diagnostic messages are shown. It is usually executed inside a loop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What Stateless Linux server? What feature it offers?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;A stateless Linux server is a
centralized server in which no state exists on the single workstations. There
may be scenarios when a state of a partilcuar system is meaningful (A snap shot
is taken then) and the user wants all the other machines to be in that state.
This is where the stateless Linux server comes into picture.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Features:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;It stores the prototypes of
every machine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;It stores snapshots taken for
those systems&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;It stores home directories for
those systems&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Uses LDAP containing
information of all systems to assist in finding out which snapshot (of state)
should be running on which system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/6592269319986111794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6592269319986111794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6592269319986111794'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/linux-interview-questions-1.html' title='Linux interview questions 1'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-27660116944674744</id><published>2012-05-03T06:06:00.000-07:00</published><updated>2012-05-03T06:17:55.006-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 6</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

Retrieving Data with SELECT&lt;/h1&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Retrieving information from our tables is probably the operation we do most of the times. This is the way to get answers to questions like �what are the cities with a population over a certain number?�.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;In fact, we previously did a&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;when we clicked on the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Browse&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;link for table cities. This generated a simple form of the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;statement:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT * FROM `cities` LIMIT 0,30;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Here, the asterisk means �all the columns�. We add&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;and the name of the table which we want to query. The&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;LIMIT 0,30&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;means to start at row number 0 (the first one), and select a maximum of 30 rows.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Let&#39;s try a&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Search&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;to see more options for the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;. We go to the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Search&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;sub-page for table cities, and we choose only some columns we need:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;img height=&quot;289&quot; src=&quot;http://www.php-editors.com/articles/images/image008.jpg&quot; width=&quot;555&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Then at the bottom of the page, we choose to display by the result by population in descending order:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;LayoutInformationPACKT1&quot; style=&quot;color: red; font-size: 14pt; font-weight: bold;&quot;&gt;&lt;img height=&quot;84&quot; src=&quot;http://www.php-editors.com/articles/images/image010.jpg&quot; width=&quot;480&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Executing the search generates the following query:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT `city_name` , `population`&lt;br /&gt;FROM `cities`&lt;br /&gt;WHERE 1&lt;br /&gt;ORDER BY `population` DESC LIMIT 0,30&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We see that the asterisk has been replaced by a comma-separated list of columns. A condition&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;WHERE 1&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;has been added by phpMyAdmin, this is a condition which is always true and selects all rows. We will see in a moment that we can replace it with some other condition. Also, the clause&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;ORDER BY&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;appears, followed by the column on which we want to sort results, and the keyword&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;DESC&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;for descending order (we could also use&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;ASC&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;for ascending).&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Conditions&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;To easily add a condition, on the results page we can click on&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;SQL-query: Edit&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, which brings the Query window popup. We add a condition on the country:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT `city_name` , `population`&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;FROM `cities`&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;WHERE country_code = &#39;zh&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;ORDER BY `population`&amp;nbsp; DESC&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;which displays all cities located in China (ok, we were a bit lazy with data entry, but you get the picture).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Conditions can be expressed using a rich array of operators and functions. Here are two examples:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Finding the Canadian cities with a population over 100000:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;WHERE population &amp;gt; 100000 AND country_code = &#39;ca&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Finding the cities whose name starts with �A�:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;WHERE city_name like &#39;A%&#39;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Aggregate functions&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Summary information may be generated by grouping on a specific column. Here we ask the average city population per country:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT country_code, AVG(population)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;FROM cities&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;GROUP BY country_code&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Other possible aggregate functions are&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;MIN()&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;MAX()&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SUM()&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;COUNT()&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, which compute respectively the minimum value, maximum value, sum of values, and number of values. For example, we could get the number of cities per country with:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT country_code, count(city_name)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;FROM cities&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;GROUP BY country_code&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Joins&lt;/h2&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Normally, a relational database involves many tables, linked on common keys. We may need at times to run queries on more than one table. Linking, or joining, tables can be done using different techniques; we will focus on a simple method involving key comparison.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;In the following query, the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;clause contains a comma-separated list of tables. In the columns list, we use the table name and a dot as a prefix before each column name (not strictly necessary if each column name is only present in one table).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;SELECT cities.city_name, cities.population, countries.country_name&lt;br /&gt;FROM cities, countries&lt;br /&gt;WHERE cities.country_code = countries.country_code LIMIT 0,30&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;img height=&quot;140&quot; src=&quot;http://www.php-editors.com/articles/images/image012.jpg&quot; width=&quot;443&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

Conclusion&lt;/h1&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The SQL language has much more to it than the basic statements that we have covered here. However, this article has covered the basics of SQL and how to use the phpMyAdmin tool to advance your knowledge of SQL.&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-5.html&quot;&gt;&amp;lt;&amp;lt;&amp;lt; PREVIOUS&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Will come.....&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/27660116944674744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/27660116944674744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/27660116944674744'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-6.html' title='PhpMyAdmin Tutorial 6'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-7163222554375879162</id><published>2012-05-03T06:05:00.000-07:00</published><updated>2012-05-03T06:16:50.230-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 5</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

Data modification&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;In this section, we will learn the basic syntax for the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;INSERT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;UPDATE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;DELETE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;statements.&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Adding Data with INSERT&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Let&#39;s first examine the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;INSERT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;statement, by looking at the code phpMyAdmin generates when we do an Insert operation. We bring up the Insert sub-page, in Table view for the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;countries&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;table, and we enter data about a country:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;
&lt;img height=&quot;136&quot; src=&quot;http://www.php-editors.com/articles/images/image004.jpg&quot; width=&quot;576&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;When we click&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Go&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, the data is inserted and phpMyAdmin shows us the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;INSERT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;statement used:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodeEndPACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;INSERT INTO `countries` ( `country_code` , `country_name` )&lt;br /&gt;VALUES (&#39;ca&#39;, &#39;Canada&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;After the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;INSERT INTO&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;part, we have the table name. In MySQL, we can enclose table names and column names within backticks, in case there are special characters in them, like reserved words or accented characters. Then we open a first set of brackets, listing the columns in which we want to insert, separated by commas. The reserved word&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;VALUES&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;follows, then the last set of brackets enclosing the values, in the same order as the columns list. If the values have a character data type, we have to enclose them within quotes.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We can now insert a city.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;INSERT INTO `cities` ( `id` , `city_name` , `latitude` , `longitude` , `population` , `country_code` )&lt;br /&gt;VALUES (&#39;&#39;, &#39;Sherbrooke&#39;, &#39;45 23 59.00&#39;, &#39;-71 46 11.00&#39;, 125000, &#39;ca&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Here, we put an empty value for id, because this column&#39;s auto-increment attribute will provide a value. We also see that the population value, being numeric, does not need to be surrounded by quotes.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Let&#39;s end this section by inserting some data for another country and city, which we will need later.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;INSERT INTO `countries` ( `country_code` , `country_name` )&lt;br /&gt;VALUES (&#39;zh&#39;, &#39;China&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;INSERT INTO `cities` ( `id` , `city_name` , `latitude` , `longitude` , `population` , `country_code` )&lt;br /&gt;VALUES (&#39;&#39;, &#39;Shanghai&#39;, &#39;31 13 58.00&#39;, &#39;121 26 59.99&#39;, 11000000, &#39;zh&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Updating Data with UPDATE&lt;/h2&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We first click on&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Browse&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;for table cities, displayed our single row of data.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;img height=&quot;110&quot; src=&quot;http://www.php-editors.com/articles/images/image006.jpg&quot; width=&quot;576&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;By clicking on the small pencil-shaped icon (or&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Edit&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;link), we go to the Edit panel for this row. We decide to change the population value to 130000. After a click on&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Save&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, phpMyAdmin shows the following statement:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodeEndPACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;UPDATE `cities` SET `population` = &#39;130000&#39; WHERE `id` = &#39;1&#39; LIMIT 1 ;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Here we have the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;UPDATE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;keyword, followed by the table name. The&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;keyword introduces the list of modifications (here only the population), which follows the format&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;column = new value&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We now see the condition&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;WHERE `id` = &#39;1&#39;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, which uses the primary key information to limit the change to only this row, i.e. only this city.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;limit 1&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;part is a safeguard added by phpMyAdmin, in case there would be no primary key defined, to avoid doing the change to more than one row.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;More than one column can be changed in a single&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;UPDATE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;operation:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;UPDATE `cities` SET `city_name` = &#39;Sherbrooke, Qu�bec&#39;,&lt;br /&gt;`population` = &#39;130001&#39; WHERE `id` = &#39;1&#39; LIMIT 1 ;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

&lt;/h2&gt;
&lt;h2 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 16px; text-align: -webkit-auto;&quot;&gt;

Deleting Data with DELETE&lt;/h2&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;In&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Browse&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;mode on table cities, clicking on the small red trash-can icon (or&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Delete&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;link) brings up a dialog to confirm the execution of the following statement:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;DELETE FROM `cities` WHERE `id` = &#39;1&#39; LIMIT 1 ;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The syntax is simple, involving just the table name, and the condition to apply for the delete operation.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: white; border-left-style: solid; border-left-width: 1pt; border-right-color: white; border-right-style: solid; border-right-width: 1pt; border-top-color: white; border-top-style: solid; border-top-width: 1pt; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 8pt; padding-left: 6pt; padding-right: 6pt; padding-top: 6pt; text-align: -webkit-auto;&quot;&gt;
&lt;div class=&quot;InformationBoxPACKT&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-style: none; border-bottom-width: medium; border-color: initial; border-image: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: &#39;Times New Roman&#39;; padding-bottom: 0cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
&lt;div style=&quot;font-size: 10pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white;&quot;&gt;Omitting the WHERE condition in an UPDATE or DELETE operation is perfectly legal in SQL, but then the operation takes place on every rows of the table!&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-4.html&quot;&gt;&amp;lt;&amp;lt;&amp;lt; PREVIOUS&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-6.html&quot;&gt;NEXT &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/7163222554375879162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/7163222554375879162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/7163222554375879162'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-5.html' title='PhpMyAdmin Tutorial 5'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-3497179943665284308</id><published>2012-05-03T06:03:00.000-07:00</published><updated>2012-05-03T06:14:33.926-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 4</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 32px; text-align: right;&quot;&gt;Learning SQL Using phpMyAdmin&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

What is SQL?&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Structured Query Language is a non-procedural language used to define, manipulate and retrieve data. It was developed by IBM (System/R project) in 1974-1979. The American National Standards Institute (ANSI) published in 1986 the first official standard of the language (later revised in 1989, 1992 and 1999), and since then,&amp;nbsp; the industry has widely adopted SQL as&amp;nbsp;&lt;span class=&quot;ItalicsPACKT&quot; style=&quot;font-style: italic;&quot;&gt;the&lt;/span&gt;&amp;nbsp;relational database language. Virtually every database system nowadays is interfaced through SQL.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The specific data architecture addressed by SQL is called the&lt;i&gt;&amp;nbsp;&lt;span class=&quot;ItalicsPACKT&quot;&gt;relational architecture&lt;/span&gt;.&amp;nbsp;&lt;/i&gt;The various pieces of data (columns) are grouped into tables contained in databases, and we retrieve data using&amp;nbsp;&lt;span class=&quot;ItalicsPACKT&quot; style=&quot;font-style: italic;&quot;&gt;relations&lt;/span&gt;&amp;nbsp;expressed between the tables.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;In this article, we will use MySQL, a popular open-source implementation of SQL that is deployed by most Web host providers.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

Toolkit for this guide&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;To be able to do the exercises in this guide, you will need an access to a MySQL server. Your interface to MySQL will be phpMyAdmin, a PHP application running on a PHP-enabled Web server.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; color: #333366; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 18px; text-align: -webkit-auto;&quot;&gt;

Creating Sample Tables&lt;/h1&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We will use a geographical information system as an example. We decide that we need information about cities and countries, so we design two tables, which will be part of a database called&amp;nbsp;&lt;span class=&quot;ItalicsPACKT&quot; style=&quot;font-style: italic;&quot;&gt;geodb&lt;/span&gt;&amp;nbsp;(although any database name would do). To create the tables, we can use phpMyAdmin&#39;s&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Structure&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;sub-page in&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;Database&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;view, or we can use the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ScreenTextPACKT&quot; style=&quot;color: green;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 9pt;&quot;&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;query box to enter the appropriate statement:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoBodyText&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;img height=&quot;277&quot; src=&quot;http://www.php-editors.com/articles/images/image002.jpg&quot; width=&quot;576&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;LayoutInformationPACKT&quot; style=&quot;background-color: white; color: red; font-family: Arial; font-size: 14pt; font-weight: bold; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The table creation is accomplished with the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;CREATE TABLE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;statement, in which we give the new table&#39;s name. The statement begins with&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;CREATE TABLE&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, followed by the table name. Then, enclosed in brackets, we put the list of columns,&amp;nbsp; and information about the keys. Each column is assigned a name, data type, the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;NOT NULL&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;attribute (here,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;NOT NULL&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;means the column cannot have a&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;value) and a default value, if appropriate.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;CREATE TABLE cities (&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; id int(11) NOT NULL auto_increment,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; city_name varchar(50) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; latitude varchar(15) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; longitude varchar(15) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; population int(11) NOT NULL default &#39;0&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; country_code char(2) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; PRIMARY KEY&amp;nbsp; (id)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodeEndPACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;) TYPE=MyISAM AUTO_INCREMENT=1 ;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The id column is our primary key, a column which uniquely identifies each city. Its data type is&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;(an integer number), and MySQL will assign unique numbers to it, thanks to the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;auto_increment&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;attribute. Note that we cannot use the city name as a primary key, as some city names are not unique in the world. We also use an integer for the population data.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The other columns use character (&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;CHAR&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;) or variable character (&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;VARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;) data types. When we know the exact length of data, it&#39;s better to use&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;CHAR&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, specifying the length of the column as in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;CHAR(2)&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;. Otherwise we use a variable character data type, which will take only the space needed by each piece of data, and we specify the maximum length, as in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;VARCHAR(15)&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;After the columns list, we have some table-specific information, like its type, and the first value for the auto-increment column. SQL statements end with a semi-colon.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Having created our cities table, we do the same operation, this time for the countries table.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;CREATE TABLE countries (&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; country_code char(2) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; country_name varchar(100) NOT NULL default &#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;CodePACKT&quot; style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;; font-size: 11px; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;) TYPE=MyISAM;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: Arial; font-size: 12pt; text-align: -webkit-auto;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We notice that the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;country_code&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;column is present in both tables. This shows the relational principle: the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;country_code&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;cities&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;refers to the same column in&lt;/span&gt;&lt;span class=&quot;CodeInTextPACKT&quot; style=&quot;color: red; font-family: &#39;Lucida Console&#39;;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8pt;&quot;&gt;countries&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;. This way, we save on space, having each&amp;nbsp; country name only once in our database.&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-3.html&quot;&gt;&amp;lt;&amp;lt;&amp;lt; PREVIOUS&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-5.html&quot;&gt;NEXT &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/3497179943665284308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/3497179943665284308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/3497179943665284308'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-4.html' title='PhpMyAdmin Tutorial 4'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-2584879193123769191</id><published>2012-05-03T06:00:00.000-07:00</published><updated>2012-05-03T06:13:06.505-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;Inputting data into the table.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&amp;nbsp;Click the tab labeled &quot;Insert&quot; -&amp;nbsp; and another window should appear, like this.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Adding records&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin7.gif&quot; style=&quot;height: 359px; width: 575px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Now type in the details for each of the fields for this record. The &quot;id&quot; column was set to automatically increment so you do not need to enter a number.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;Note&lt;/b&gt;&amp;nbsp;- if you ever get lost with phpMyAdmin navigation&amp;nbsp; click &quot;Home&quot; in the left hand nav bar and start again.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Now click&amp;nbsp;&lt;b&gt;Save&lt;/b&gt;&amp;nbsp;and the record is saved to the&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;people&lt;/span&gt;&amp;nbsp;table.&lt;br /&gt;
The previous window reappears with the SQL command for the insert. You can keep adding recordsby re-selecting&amp;nbsp;&lt;b&gt;Insert&lt;/b&gt;&quot;.&lt;br /&gt;
For multiple records, you can select the &quot;Insert another new row&quot; radio button on the input form.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
When you&#39;ve finished entering&amp;nbsp; several records into the table, you can check them by clicking on the&amp;nbsp; Browse tab. You can click on&amp;nbsp; individual records for editing or deleting.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;browsing your table&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin8.gif&quot; style=&quot;border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; height: 525px; width: 480px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
You can use the Select tab to refine your display when your database starts grows to many pages of records.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;Backup your data&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
You &quot;don&#39;t know what you&#39;ve got &#39;til its gone&quot;!&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
- Click on your database name in the left hand navigation bar&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
- Click on EXPORT (top tab)&lt;br /&gt;
- Highlight the table/s you want to back up&lt;br /&gt;
- Select STRUCTURE and DATA radio button&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
- Select &quot;Enclose table and field names with backquotes&quot;&lt;br /&gt;
-&amp;nbsp; Select &quot;Save as file&quot; and &quot;zipped&quot; check boxes&lt;br /&gt;
- Click &quot;Go&quot; and a zipped archive file will be generated.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Well done! - you&#39;ve created a database, a table and fields, entered in a few records, viewed the records, edited and perhaps deleted some of them&amp;nbsp;&lt;b&gt;and&lt;/b&gt;&amp;nbsp;practised backing up.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-2.html&quot;&gt;&amp;lt;&amp;lt;&amp;lt; PREVIOUS&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-4.html&quot;&gt;NEXT &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/2584879193123769191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/2584879193123769191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/2584879193123769191'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-3.html' title='PhpMyAdmin Tutorial 3'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-4662173257654372128</id><published>2012-05-03T05:58:00.000-07:00</published><updated>2012-05-03T06:11:28.653-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
We will create a table in the database, called &quot;people&quot;. Use the&amp;nbsp;&lt;b&gt;Create new table&lt;/b&gt;&amp;nbsp;feature. Type in the name of the new table into the&amp;nbsp;&lt;b&gt;Name:&lt;/b&gt;&amp;nbsp;people, and the number of columns in the table (4) into&amp;nbsp;&lt;b&gt;Fields:&lt;/b&gt;. This tutorial is only designed to show you the basic php/MySQL/phpMyAdmin functions. You can delete it using the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Drop&lt;/span&gt;&lt;/span&gt;&amp;nbsp;function. You will want to allow for growth in your table.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Defining fields&quot; height=&quot;198&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin3.gif&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Click&amp;nbsp;&lt;b&gt;Go&lt;/b&gt;&amp;nbsp;and you should see something like this. The table title now appears with under the database name.&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;table features&quot; height=&quot;180&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin5.gif&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Now enter the names and attributes of our table fields. Enter the following information as above:&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;
&lt;center&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;height: 155px; width: 327px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;textblue12px&quot;&gt;Field&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;Type&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;Length&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;Default&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;Extra&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;textblue12px&quot;&gt;id&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;int&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;6&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;0&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;auto_increment&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;textblue12px&quot;&gt;name&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;char&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;100&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;textblue12px&quot;&gt;telephone&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;char&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;50&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;textblue12px&quot;&gt;birthday&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;char&lt;/td&gt;&lt;td class=&quot;textblue12px&quot;&gt;50&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
The Length value indicates the maximum allowable length of characters for input. There are many different values that can be set for Type; see&amp;nbsp;&lt;a href=&quot;http://www.mysql.com/doc/en/String_types.html&quot; target=&quot;_blank&quot;&gt;further documentation here&lt;/a&gt;. The Types specified in this example aren&#39;t the most efficient, but just used for the purposes of this exercise. The &quot;id&quot; field, which will be used as a&amp;nbsp;&lt;b&gt;Primary key&lt;/b&gt;&amp;nbsp;for this table, has been set to&amp;nbsp;&lt;b&gt;auto_increment&lt;/b&gt;, saving you from having to having to type in the next number in sequence when you input records.&amp;nbsp; Set the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Default&amp;nbsp;&lt;/span&gt;to 0&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Once you&#39;ve entered all the values, click&amp;nbsp;&lt;b&gt;Save&lt;/b&gt;. A screen like this will appear.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Table properties&quot; height=&quot;428&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin6.gif&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Congratulations!-You have created your table! The corresponding SQL command for creating these fields is also displayed. This isn&#39;t needed but in time you will start to recognise MySql commands&lt;br /&gt;
Note that you can use&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Drop&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;to delete a table or fields.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
When you are ready we suggest you check out&amp;nbsp; all of the options on this page.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-1.html&quot;&gt;&amp;lt;&amp;lt;&amp;lt; PREVIOUS&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-3.html&quot;&gt;NEXT &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/4662173257654372128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4662173257654372128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4662173257654372128'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-2.html' title='PhpMyAdmin Tutorial 2'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-4162613019295095103</id><published>2012-05-03T05:55:00.003-07:00</published><updated>2012-05-03T06:08:53.852-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHPMYADMIN"/><title type='text'>PhpMyAdmin Tutorial 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;PhpMyAdmin is web base software used for creating and maintaining MySQL databases.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
This tutorial is designed to get you starting with the basics of phpMyAdmin.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
You can access your MySQL account using phpMyAdmin using the link provided to you --something like below where&amp;nbsp; my-domain.ca&amp;nbsp; is your domain&amp;nbsp; name&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;
http://www.my-domain.ca/phpmyadmin/&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
When you click on the link above, a dialog box will prompt you for a username and password. This will be the username and password given you when we set&amp;nbsp; it up for you.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Login screen&quot; src=&quot;http://www.reg.ca/faq/login.gif&quot; style=&quot;height: 285px; width: 317px;&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Once you log in, a phpMyAdmin screen appears as shown below.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;phpMyAdmin welcome page&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin.gif&quot; style=&quot;height: 253px; width: 673px;&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;Creating a table in your database&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
The left-hand frame in phpMyAdmin is used for navigation.You will see your database displayed here (in this case called mydomain). As you create tables, they will show below this.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Click on your database the navigation frame and a new window will appear on the right hand side.&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Creating a table&quot; src=&quot;http://www.reg.ca/faq/phpmyadmin2.gif&quot; style=&quot;height: 222px; width: 739px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;a href=&quot;http://hi/&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://phpinfoview.blogspot.in/2012/05/phpmyadmin-tutorial-2.html&quot;&gt;NEXT &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/4162613019295095103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4162613019295095103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4162613019295095103'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/phpmyadmin-tutorial-1.html' title='PhpMyAdmin Tutorial 1'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-3741419144509313218</id><published>2012-05-02T06:24:00.000-07:00</published><updated>2012-05-02T06:24:15.327-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Get original URL referer with PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;Store it either in a cookie (if it&#39;s acceptable for your situation), or in a session variable.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;php

&amp;nbsp; session_start&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(!&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;origURL&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]))&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; $_SESSION&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;origURL&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $_SERVER&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;HTTP_REFERER&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;$_SERVER[&#39;HTTP_REFERER&#39;];&lt;/code&gt; to get the referer Url. It works as expected until the user clicks another page and the referer changes to the last page.&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;if more ways is there Please share here..................&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/3741419144509313218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/get-original-url-referer-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/3741419144509313218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/3741419144509313218'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/get-original-url-referer-with-php.html' title='Get original URL referer with PHP'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-255945828324560383</id><published>2012-05-02T06:14:00.000-07:00</published><updated>2012-05-02T06:14:09.255-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 23</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;96) what is MVC? why its been used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Model-view-controller (MVC)
is an architectural pattern used in software engineering. Successful use of the
pattern isolates business logic from user interface considerations, resulting
in an application where it is easier to modify either the visual appearance of
the application or the underlying business rules without affecting the other.
In MVC, the model represents the information (the data) of the application; the
view corresponds to elements of the user interface such as text, checkbox
items, and so forth; and the controller manages the communication of data and
the business rules used to manipulate the data to and from the model. WHY ITS
NEEDED IS 1 Modular separation of function 2 Easier to maintain 3
View-Controller separation means:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;A Tweaking design (HTML) without altering code B â€” Web design staff can
modify UI without understanding code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;97) what is framework? how it works? what is
advantage?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In general, a framework is
a real or conceptual structure intended to serve as a support or guide for the
building of something that expands the structure into something useful.
Advantages : Consistent Programming Model Direct Support for Security
Simplified Development Efforts Easy Application Deployment and Maintenance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;98) what is CURL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CURL means Client URL Library&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;curl is a command line tool for transferring files with URL syntax,
supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS
and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading,
HTTP form based upload, proxies, cookies, user+password authentication (Basic,
Digest, NTLM, Negotiate, kerberos), file transfer resume, proxy tunneling and a
busload of other useful tricks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;CURL allows you to connect and communicate to many different types of
servers with many different types of protocols. libcurl currently supports the
http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also
supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also
be done with PHP’s ftp extension), HTTP form based upload, proxies, cookies,
and user+password authentication.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;99) what is PDO ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The PDO ( PHP Data Objects
) extension defines a lightweight, consistent interface for accessing databases
in PHP. if you are using the PDO API, you could switch the database server you
used, from say PgSQL to MySQL, and only need to make minor changes to your PHP
code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;While PDO has its advantages, such as a clean, simple, portable API but its
main disadvantage is that it doesn&#39;t allow you to use all of the advanced features
that are available in the latest versions of MySQL server. For example, PDO
does not allow you to use MySQL&#39;s support for Multiple Statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Just need to use below code for connect mysql using PDO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;try {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$dbh = new PDO(&quot;mysql:host=$hostname;dbname=databasename&quot;,
$username, $password);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$sql = &quot;SELECT * FROM employee&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;foreach ($dbh-&amp;gt;query($sql) as $row)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;print $row[&#39;employee_name&#39;] .&#39; - &#39;. $row[&#39;employee_age&#39;] ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;catch(PDOException $e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;echo $e-&amp;gt;getMessage();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;100) What is PHP&#39;s mysqli Extension?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The mysqli extension, or as
it is sometimes known, the MySQL improved extension, was developed to take
advantage of new features found in MySQL systems versions 4.1.3 and newer. The
mysqli extension is included with PHP versions 5 and later.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The mysqli extension has a number of benefits, the key enhancements over
the mysql extension being:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;=&amp;gt;Object-oriented interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;=&amp;gt;Support for Prepared Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;=&amp;gt;Support for Multiple Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;=&amp;gt;Support for Transactions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;=&amp;gt;Enhanced debugging capabilities&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span lang=&quot;EN&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;&quot;&gt;=&amp;gt;Embedded
server support&amp;nbsp;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/255945828324560383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/255945828324560383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/255945828324560383'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-23.html' title='PHP Interview questions 23'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-1890396999523016059</id><published>2012-05-02T06:11:00.000-07:00</published><updated>2012-05-02T06:11:54.098-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 22</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;91) what is magic quotes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Magic Quotes is a process
that automagically escapes ncoming data to the PHP script. It’s preferred to
code with magic quotes off and to instead escape the data at runtime, as
needed. This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP
6.0.0. Relying on this feature is highly discouraged.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;92) what is cross site scripting? SQL injection?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cross-site scripting (XSS)
is a type of computer security vulnerability typically found in web
applications which allow code injection by malicious web users into the web
pages viewed by other users. Examples of such code include HTML code and
client-side scripts. SQL injection is a code injection technique that exploits
a security vulnerability occurring in the database layer of an application. The
vulnerability is present when user input is either incorrectly filtered for
string literal escape characters embedded in SQL statements or user input is
not strongly typed and thereby unexpectedly executed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;93) what is URL rewriting?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using URL rewriting we can
convert dynamic URl to static URL Static URLs are known to be &amp;nbsp;better than Dynamic URLs because of a number
of reasons 1. Static URLs typically Rank better in Search Engines. 2. Search
Engines are known to index the content of dynamic pages a lot slower compared
to static pages. 3. Static URLs are always more friendlier looking to the End
Users. along with this we can use URL rewriting in adding variables [cookies]
to the URL to handle the sessions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;94) what is the major php security hole? how to
avoid?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Never include, require,
or otherwise open a file with a filename based on user input, without
thoroughly checking it first.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;2. Be careful with eval() Placing user-inputted values into the eval()
function can be extremely dangerous. You essentially give the malicious user
the ability to execute any command he or she wishes!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;3. Be careful when using register_globals = ON It was originally designed
to make programming in PHP easier (and that it did), but misuse of it often led
to security holes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;4. Never run unescaped queries&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;5. For protected areas, use sessions or validate the login every time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;6. If you don’t want the file contents to be seen, give the file a .php
extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;95) whether PHP supports Microsoft SQL server ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The SQL Server Driver for PHP v1.0 is designed to enable
reliable, scalable integration with SQL Server for PHP applications deployed on
the Windows platform. The Driver for PHP is a PHP 5 extension that allows the
reading and writing of SQL Server data from within PHP scripts. using MSSQL or
ODBC modules we can access Microsoft SQL server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/1890396999523016059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1890396999523016059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1890396999523016059'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-22.html' title='PHP Interview questions 22'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-6700936463759971522</id><published>2012-05-02T06:09:00.000-07:00</published><updated>2012-05-02T06:09:49.774-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 21</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;86) how to track no of user logged in ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; whenever a user logs in track
the IP, userID etc..and store it in a DB with a active flag while log out or
sesion expire make it inactive. At any time by counting the no: of active
records we can get the no: of visitors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;87) in PHP for pdf which library used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The PDF functions in PHP
can create PDF files using the PDFlib library With version 6, PDFlib offers an
object-oriented API for PHP 5 in addition to the function-oriented API for PHP
4. There is also the Â» Panda module. FPDF is a PHP class which allows to
generate PDF files with pure PHP, that is to say without using the PDFlib
library. F from FPDF stands for Free: you may use it for any kind of usage and
modify it to suit your needs. FPDF requires no extension (except zlib to
activate compression and GD for GIF support) and works with PHP4 and PHP5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;88) for image work which library?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; we will need to compile PHP
with the GD library of image functions for this to work. GD and PHP may also
require other libraries, depending on which image formats you want to work with.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;89) what is design pattern? singleton pattern?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A design pattern is a
general reusable solution to a commonly occurring problem in software design.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The Singleton design pattern allows many parts of a program to share a
single resource without having to work out the details of the sharing
themselves.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;90) what are magic methods?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Magic methods are the
members functions that is available to all the instance of class Magic methods
always starts with &quot;__&quot;. Eg. __construct All magic methods needs to
be declared as public To use magic method they should be defined within the
class or program scope Various Magic Methods used in PHP 5 are: __construct()
__destruct() __set() __get() __call() __toString() __sleep() __wakeup()
__isset() __unset() __autoload() __clone()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/6700936463759971522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-21.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6700936463759971522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/6700936463759971522'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/05/php-interview-questions-21.html' title='PHP Interview questions 21'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-5655060038778337949</id><published>2012-04-30T08:11:00.000-07:00</published><updated>2012-04-30T08:11:06.983-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 20</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;81) How we load all classes that placed in
different directory in one PHP File , means how to do auto&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN&quot;&gt; &lt;b&gt;load classes &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by using
spl_autoload_register(&#39;autoloader::funtion&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Like below&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;class autoloader&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;public static function moduleautoloader($class)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$path = $_SERVER[&#39;DOCUMENT_ROOT&#39;] . &quot;/modules/{$class}.php&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;if (is_readable($path)) require $path;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;public static function daoautoloader($class)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$path = $_SERVER[&#39;DOCUMENT_ROOT&#39;] . &quot;/dataobjects/{$class}.php&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;if (is_readable($path)) require $path;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;public static function includesautoloader($class)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$path = $_SERVER[&#39;DOCUMENT_ROOT&#39;] . &quot;/includes/{$class}.php&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;if (is_readable($path)) require $path;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;spl_autoload_register(&#39;autoloader::includesautoloader&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;spl_autoload_register(&#39;autoloader::daoautoloader&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;spl_autoload_register(&#39;autoloader::moduleautoloader&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;82) How many types of Inheritances used in PHP
and how we achieve it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As far PHP concern it only
support single Inheritance in scripting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;we can also use interface to achieve multiple inheritance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;83)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHP
how to know user has read the email?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Using Disposition-Notification-To: in mailheader we can get read
receipt.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Add the possibility to define a read receipt when sending an email.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;It’s quite straightforward, just edit email.php, and add this at vars
definitions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;var $readReceipt = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;And then, at â€˜createHeaderâ€™ function add:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;if (!empty($this-&amp;gt;readReceipt)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$this-&amp;gt;__header .= â€˜Disposition-Notification-To: â€˜ .
$this-&amp;gt;__formatAddress($this-&amp;gt;readReceipt) . $this-&amp;gt;_newLine;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;84) What are default session time and path?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default session time in PHP
is 1440 seconds or 24 minutes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Default session save path id temporary folder /tmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;85) how to track user logged out or not? when
user is idle ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span lang=&quot;EN&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;&quot;&gt;Ans :
85 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By checking the session
variable exist or not while loading th page. As the session will exist longer
as till browser closes. The default behaviour for sessions is to keep a session
open indefinitely and only to expire a session when the browser is closed. This
behaviour can be changed in the php.ini file by altering the line
session.cookie_lifetime = 0 to a value in seconds. If you wanted the session to
finish in 5 minutes you would set this to session.cookie_lifetime = 300 and
restart your httpd server.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/5655060038778337949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5655060038778337949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5655060038778337949'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-20.html' title='PHP Interview questions 20'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-1656629326937946988</id><published>2012-04-30T08:09:00.000-07:00</published><updated>2012-04-30T08:09:23.331-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 19</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;76) What is the difference between char and
varchar data types?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set char to occupy n bytes
and it will take n bytes even if u r storing a value of n-m bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Set varchar to occupy n bytes and it will take only the required space and
will not use the n bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;eg. name char(15) will waste 10 bytes if we store &#39;romharshan&#39;, if each
char takes a byte eg. name varchar(15) will just use 5 bytes if we store
&#39;romharshan&#39;, if each char takes a byte. rest 10 bytes will be free.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;77) What is the functionality of md5 function in
PHP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Calculate the md5 hash of a
string. The hash is a 32-character hexadecimal number. I use it to generate
keys which I use to identify users etc. If I add random no techniques to it the
md5 generated now will be totally different for the same string I am using.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;78) How can I load data from a text file into a
table?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; you can use LOAD DATA
INFILE file_name; syntax to load data from a text file. but you have to make
sure thata) data is delimited &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;b) columns and data matched correctly&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;79) How can we know the number of days between
two given dates using MySQL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT
DATEDIFF(&quot;2007-03-07&quot;,&quot;2005-01-01&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;80) How can we know the number of days between
two given dates using PHP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $date1 =
date(&quot;Y-m-d&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$date2 = &quot;2006-08-15&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$days = (strtotime($date1) - strtotime($date2)) / (60 * 60 * 24);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/1656629326937946988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1656629326937946988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/1656629326937946988'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-19.html' title='PHP Interview questions 19'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-5879842064870828969</id><published>2012-04-30T08:07:00.001-07:00</published><updated>2012-04-30T08:07:58.193-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 18</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;71) What type of inheritance that PHP supports?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In PHP an extended class is
always dependent on a single base class, that is, multiple inheritance is not
supported. Classes are extended using the keyword &#39;extends&#39;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;72) What is the difference between Primary Key
and Unique key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Primary Key: A column in a
table whose values uniquely identify the rows in the table. A primary key value
cannot be NULL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Unique Key: Unique Keys are used to uniquely identify each row in the table.
There can be one and only one row for each unique key value. So NULL can be a
unique key.There can be only one primary key for a table but there can be more than
one unique for a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;73) what is garbage collection? default time ?
refresh time?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : Garbage Collection is an automated part of PHP , If the Garbage
Collection process runs, it then analyzes any files in the /tmp for any session
files that have not been accessed in a certain amount of time and physically
deletes them. Garbage Collection process only runs in the default session save
directory, which is /tmp. If you opt to save your sessions in a different
directory, the Garbage Collection process will ignore it. the Garbage
Collection process does not differentiate between which sessions belong to whom
when run. This is especially important note on shared web servers. If the
process is run, it deletes ALL files that have not been accessed in the
directory. There are 3 PHP.ini variables, which deal with the garbage
collector: PHP ini value name default session.gc_maxlifetime 1440 seconds or 24
minutes session.gc_probability 1 session.gc_divisor 100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;74) What are the advantages/disadvantages of
MySQL and PHP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Both of them are open source software (so free of cost), support cross
platform. php is faster then ASP and JSP.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;75) What is the difference between GROUP BY and
ORDER BY in Sql?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span lang=&quot;EN&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;&quot;&gt;Ans :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER
BY [col1],[col2],â€¦,[coln]; Tels DBMS according to what columns it should sort
the result. If two rows will hawe the same value in col1 it will try to sort
them according to col2 and so on.GROUP BY [col1],[col2],â€¦,[coln]; Tels DBMS
to group results with same value of column col1. You can use COUNT(col1),
SUM(col1), AVG(col1) with it, if you want to count all items in group, sum all
values or view average &amp;nbsp;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/5879842064870828969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5879842064870828969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/5879842064870828969'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-18.html' title='PHP Interview questions 18'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-789845170940981061</id><published>2012-04-30T08:06:00.000-07:00</published><updated>2012-04-30T08:06:10.787-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 17</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;66) Explain Normalization concept?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : The normalization process involves getting our data to conform to three
progressive normal forms, and a higher level of normalization cannot be
achieved until the previous levels have been achieved (there are actually five
normal forms, but the last two are mainly academic and will not be
discussed).First Normal FormThe First Normal Form (or 1NF) involves removal of
redundant data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;from horizontal rows. We want to ensure that there is no duplication of data
in a given row, and that every column stores the least amount of information
possible (making the field atomic).Second Normal FormWhere the First Normal
Form deals with redundancy of data across a horizontal row, Second Normal Form
(or 2NF) deals with redundancy of data in vertical columns. As stated earlier,
the normal forms are progressive, so to achieve Second Normal Form, your tables
must already be in First Normal Form.Third Normal Form I have a confession to
make; I do not often use Third Normal Form. In Third Normal Form we are looking
for data in our tables that is not fully dependant on the primary key, but
dependant on another value in the table &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;67) How can we find the number of rows in a table
using MySQL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use this for mysql&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;gt;SELECT COUNT(*) FROM table_name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;68) How can we find the number of rows in a
result set using PHP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = mysql_query($sql,
$db_link);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;$num_rows = mysql_num_rows($result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;echo &quot;$num_rows rows found&quot;; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;69) How many ways we can we find the current date
using MySQL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : 69 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT
CURDATE();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;CURRENT_DATE() = CURDATE()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;for time use&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;SELECT CURTIME();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;CURRENT_TIME() = CURTIME()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;70) What are the advantages and disadvantages of
Cascading Style Sheets?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : External Style SheetsAdvantagesCan control styles for multiple
documents at once. Classes can be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;created for use on multiple HTML element types in many documents. Selector
and grouping methods can be used to apply styles under complex contextsDisadvantagesAn
extra download is required to import style information for each document The
rendering of the document may be delayed until the external style sheet is
loaded Becomes slightly unwieldy for small quantities of style
definitionsEmbedded Style Sheets Advantages Classes can be created for use on
multiple tag types in the document.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Selector and grouping methods can be used to apply styles under complex contexts.
No additional downloads necessary to receive style information &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Disadvantages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;This method can not control styles for multiple documents at once Inline
Styles&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Advantages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Useful for small quantities of style definitions. Can override other style
specification methods at the local level so only exceptions need to be listed
in conjunction with other style methods &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Disadvantages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Does not distance style information from content (a main goal of SGML/HTML).
Can not control styles for multiple documents at once. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Author can not create or control classes of elements to control multiple element
types within the document. Selector grouping methods can not be used to create
complex element addressing scenarios&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/789845170940981061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/789845170940981061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/789845170940981061'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-17.html' title='PHP Interview questions 17'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7167438970388311665.post-4375528225851047285</id><published>2012-04-30T08:03:00.001-07:00</published><updated>2012-04-30T08:03:55.103-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP QUESTIONS"/><title type='text'>PHP Interview questions 16</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;61) What are the other commands to know the
structure of table using MySQL commands except explain command?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; describe Table-Name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;62) How many tables will create when we create
table, what are they?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The &#39;.frm&#39; file stores the
table definition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The data file has a &#39;.MYD&#39; (MYData) extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The index file has a &#39;.MYI&#39; (MYIndex) extension,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;&amp;nbsp;63) What
is the purpose of the following files having extensions 1) .frm 2) .myd 3)
.myi? What do these files contain?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In MySql, the default table
type is MyISAM.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Each MyISAM table is stored on disk in three files. The files have names that
begin with the table name and have an extension to indicate the file type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The &#39;.frm&#39; file stores the table definition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The data file has a &#39;.MYD&#39; (MYData) extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The index file has a &#39;.MYI&#39; (MYIndex) extension&lt;/span&gt;,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;64) What is maximum size of a database in MySQL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the operating system or
filesystem places a limit on the number of files in a directory, MySQL is bound
by that constraint.The efficiency of the operating system in handling large
numbers of files in a directory can place a practical limit on the number of
tables in a database. If the time required to open a file in the directory increases
significantly as the number of files increases, database performance can be
adversely affected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The amount of available disk space limits the number of tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;MySQL 3.22 had a 4GB (4 gigabyte) limit on table size. With the MyISAM storage
engine in MySQL 3.23, the maximum table size was increased to 65536 terabytes
(2567 â€“ 1 bytes). With this larger allowed table size, the maximum effective
table size for MySQL databases is usually determined by operating system
constraints on file sizes, not by MySQL internal limits.The InnoDB storage
engine maintains InnoDB tables within a tablespace that can be created from
several files. This allows a table to exceed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;the maximum individual file size. The tablespace can include raw disk partitions,
which allows extremely large tables. The maximum tablespace size is 64TB.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;The following table lists some examples of operating system file-size limits.
This is only a rough guide and is not intended to be definitive. For the most
up-to-date information, be sure to check the documentation specific to your
operating system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Operating System File-size LimitLinux 2.2-Intel 32-bit 2GB (LFS: 4GB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Linux 2.4+ (using ext3 filesystem) 4TB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Solaris 9/10 16TB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;NetWare w/NSS filesystem 8TB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Win32 w/ FAT/FAT32 2GB/4GB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Win32 w/ NTFS 2TB (possibly larger)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;MacOS X w/ HFS+ 2TB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot;&gt;65) Give the syntax of Grant and Revoke commands?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;Ans : &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The generic syntax for
grant is as following &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;&amp;gt; GRANT [rights] on [database/s] TO [username@hostname] IDENTIFIED BY [password]
now rights can be &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;a) All privileges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;b) combination of create, drop, select, insert, update and delete etc.We
can grant rights on all databse by using *.* or some specific database by
database.* or a specific table by database.table_name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;username@hotsname can be either username@localhost, username@hostname and
username@%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;where hostname is any valid hostname and % represents any name, the *.* any
condition password is simply the password of userThe generic syntax for revoke
is as following &amp;gt; REVOKE [rights] on &amp;nbsp;[database/s]
FROM [username@hostname] now rights can be as explained above &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;a) All privileges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;b) combination of create, drop, select, insert, update and delete etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;username@hotsname can be either username@localhost, username@hostname and
username@%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;where hostname is any valid hostname and % represents any name, the *.*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN&quot;&gt;any condition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpinfoview.blogspot.com/feeds/4375528225851047285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4375528225851047285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7167438970388311665/posts/default/4375528225851047285'/><link rel='alternate' type='text/html' href='http://phpinfoview.blogspot.com/2012/04/php-interview-questions-16.html' title='PHP Interview questions 16'/><author><name>Anilkumar Perecherla</name><uri>http://www.blogger.com/profile/01970165318595596518</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>