<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>SQL</title>
<link>http://www.computersight.com/tags/SQL</link>
<description>New posts about SQL</description>
<item>
<title>SQL and Databases</title>
<link>http://www.computersight.com/Programming/SQL-and-Databases.289641</link>
<description>
<![CDATA[<h3>SQ</h3>
<p>SQL can be expanded as Structured Query Language. It is used to create, manipulate and delete data in a database. This language facilitates very easy database interactions. SQL statements are simple and easy to execute.</p>
<h3>Query</h3>
<p>Query is a statement which is used to manipulate data available in a database, granting users roles and permissions, creating new databases, creating new tables, deleting table values etc.</p>
<h3>Creating New Tables</h3>
<p>Using a single statement we can able to create a new table. The following query when executed creates a new table.</p>
<h4>Syntax</h4>
<p>Create table TABLE_NAME (VARIABLES)</p>
<h4>Example</h4>
<p>Create table employee (name VARCHAR (20), num NUMBER (5))</p>
<p>The above query creates employee table with name and num fields. It has the ability to store number of names with their employee numbers.</p>
<h3>Inserting Values to New Table</h3>
<p>Insert statement is used to insert a new record into the table. The Insert statement has the following syntax.</p>
<h4>Syntax</h4>
<p>Insert into TABLE_NAME (VALUES)</p>
<h4>Example</h4>
<p>Insert into employee ('xxx', 30)</p>
<h3>Modifying Values in a Table</h3>
<p>We can able to modify the values available in a table by using the update query. The update query has the following syntax.</p>
<h4>Syntax</h4>
<p>Update TABLE_NAME set VARIABLE = VALUE where CONDITION</p>
<h4>Example</h4>
<p>Update employee set name='xyz' where num=30</p>
<h3>Selecting a Particular Record</h3>
<p>A particular record can be fetched from the table. It can be evaluated by using the select query.</p>
<h4>Syntax</h4>
<p>Select VARIABLES from TABLE_NAME</p>
<h4>Example</h4>
<p>Select name, num from employee where num=30</p>
<p>The above query when executed checks the database for num=30 if the condition is satisfied then the particular query will be fetched from the table.</p>
<h3>Deleting a Record from the Table</h3>
<p>A particular record can be deleted from the table using the following query. Using the delete statement we can able to delete a single record or a group of record having a same attribute.</p>
<h4>Syntax</h4>
<p>Delete from TABLE_NAME where CONDITION</p>
<h4>Example</h4>
<p>Delete from employee where num=30</p>
<p>This article describes the basic SQL operations such as creating a table, selecting values from the table, inserting a new record, modifying an existing record, deleting a record. All these queries form the basis for the database operations.</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FSQL-and-Databases.289641"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FSQL-and-Databases.289641" border="0"/></a>]]></description>
<pubDate>Wed, 08 Oct 2008 14:45:21 PST</pubDate></item>
<item>
<title>PHP Tutorial: Printing on the Screen</title>
<link>http://www.computersight.com/Programming/PHP/PHP-Tutorial-Printing-on-the-Screen.112786</link>
<description>
<![CDATA[<p>PHP is a script language commonly used by webmasters to design dynamic websites. Unlike HTML which has static content, PHP has dynamic content because of user interaction. Today, most of the qualified websites are designed by PHP or CGI.</p>
 
<p>PHP scripts embedded into the HTML codes. When someone checks the source code of the page, he doesn't get anything about PHP scripts. He only learns the HTML part of coding. This article is an introduction to PHP scripting language. One can find useful information and have enough knowledge after reading my PHP tutorial series. Without delay, I would like to start my script creation step by step.</p>
 
<p>Before starting, you should know that you have to set up PHP installations into your computer. Such installations are PHP itself, Phpmyadmin interface, Mysql database and Apache Server. Without these, your scripts are nothing since they are not compiled by your computer.</p>
 
<h3>Step 1:</h3>
 
<p>To write PHP scripts, we need a place. That place is a simple text editor. You are free to choose your text editor. I prefer  to use Notepad. There are other alternatives like Editplus or Elfima. If your operating system is not Windows but Linux, you can place your code into Vi editor or Pico. I have never tried but I think you can use Dreamveawer, Hotdog or Frontpage.</p>
 
<p>In your text editor, open an new file and save it as &amp;ldquo;myfirst.php&amp;rdquo; or &amp;ldquo;myfirst.html&amp;rdquo; . I choose the name of file as &amp;ldquo;myfirst&amp;rdquo; but you are free to choose anything.</p>
 
<h3>Step 2:</h3>
 
<p>I have told you before that PHP scripts are embedded into HTML codes. So, first of all we will write HTML codes. The basic codes are HTML, TITLE, HEAD and BODY. It can be written by lowercase letters as well. This part is not important.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_0.jpg" alt="" /></p>
 
<p><strong>Step 3: </strong>All PHP scripts start with &amp;ldquo;  &amp;rdquo;. Only the part between two  is compiled by server and evaluated as output.To print characters on the screen, standart output functions of PHP are used. Those are &amp;ldquo; print &amp;rdquo; and &amp;ldquo; echo &amp;rdquo;. In some circumstances, &amp;rdquo; printf &amp;rdquo; is used too.</p>
 
<p>The format of printing:</p>
 <ol> 
<li> print  ( &amp;ldquo; your output &amp;rdquo; ) ;</li>
 
<li> print   &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo ( &amp;ldquo; your outpu t&amp;rdquo; ) ; </li>
 </ol> 
<p>If you don't use any white space characters, the strings are written without any separation. For example if you write this code;</p>
 
<ul>
<li>Print ( &amp;ldquo; Word1 &amp;rdquo; ) ;</li>
 
<li>Print ( &amp;ldquo; Word2 &amp;rdquo; ) ;</li>
 
</ul>
<p>It will be outputted as Word1Word2.</p>
 
<p>To remove this fault,white space characters are used. In PHP code part, between print functions, we place &amp;lt; br &amp;gt; code.</p>
 
<p>Example: To be more understandable,I will write a simple PHP script. Output will be the name of my favorite Triond writers.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_1.jpg" alt="" /></p>
 
<p>To see the output,<a href="http://learnphp.awardspace.biz/" target="_blank"> Click here.</a></p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786" border="0"/></a>]]></description>
<pubDate>Tue, 22 Apr 2008 06:42:32 PST</pubDate></item>
</channel>
</rss>
