<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>PHP FAQs</title><description></description><managingEditor>noreply@blogger.com (Pictures Online)</managingEditor><pubDate>Mon, 2 Sep 2024 11:41:14 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">29</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://phpfaqs.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Difference between PHP 4 and 5 - Magic Methods</title><link>http://phpfaqs.blogspot.com/2011/10/difference-between-php-4-and-5-magic.html</link><category>Magic Methods</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 29 Oct 2011 22:35:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-8518379569644662255</guid><description>There are a number of "magic methods" that add an assortment to functionality to your classes. Note that PHP reserves the naming of methods prefixed with a double-underscore. Never name any of your methods with this naming scheme!&lt;br /&gt;&lt;br /&gt;Some magic methods to take note of are __call, __get, __set and __toString. These are the ones I find most useful.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between PHP 4 and 5 - __autoload Function</title><link>http://phpfaqs.blogspot.com/2011/10/difference-between-php-4-and-5-autoload.html</link><category>__autoload Function</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 29 Oct 2011 22:31:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-4750446921868273936</guid><description>Using a specially named function, __autoload, you can automatically load object files when PHP encounters a class that hasn't been defined yet. Instead of large chunks of include's at the top of your scripts, you can define a simple autoload function to include them automatically.&lt;br /&gt;&lt;br /&gt;function __autoload($class_name) {&lt;br /&gt;     require_once "./includes/classes/$class_name.inc.php";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note you can change the autoload function or even add multiple autoload functions using spl_autoload_register and related functions.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between PHP 4 and 5-New Extensions</title><link>http://phpfaqs.blogspot.com/2011/10/difference-between-php-4-and-5-new.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 29 Oct 2011 22:27:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-7162838709445233521</guid><description>PHP5 also introduces new default extensions.&lt;br /&gt;&lt;br /&gt;1. SimpleXML for easy processing of XML data&lt;br /&gt;2. DOM and XSL extensions are available for a much improved XML-consuming experience. A breath of fresh air after using DOMXML for PHP4!&lt;br /&gt;3. PDO for working with databases. An excellent OO interface for interacting with your database.&lt;br /&gt;4. Hash gives you access to a ton of hash functions if you need more then the usual md5 or sha1.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between PHP 4 and 5 - Exceptions</title><link>http://phpfaqs.blogspot.com/2011/10/difference-between-php-4-and-5.html</link><category>Exceptions</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 29 Oct 2011 22:23:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-2384002523093909799</guid><description>PHP finally introduces exceptions! An exception is basically an error. By using an exception however, you gain more control the simple trigger_error notices we were stuck with before.&lt;br /&gt;&lt;br /&gt;An exception is just an object. When an error occurs, you throw an exception. When an exception is thrown, the rest of the PHP code following will not be executed. When you are about to perform something "risky", surround your code with a try block. If an exception is thrown, then your following catch block is there to intercept the error and handle it accordingly. If there is no catch block, a fatal error occurs.&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;    $cache-&gt;write();&lt;br /&gt;} catch (AccessDeniedException $e) {&lt;br /&gt;    die('Could not write the cache, access denied.');&lt;br /&gt;} catch (Exception $e) {&lt;br /&gt;   die('An unknown error occurred: ' . $e-&gt;getMessage());&lt;br /&gt;}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between PHP 4 and 5 - passed by reference</title><link>http://phpfaqs.blogspot.com/2011/10/difference-between-php-4-and-5-passed.html</link><category>php 5</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Mon, 17 Oct 2011 00:20:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-5280010979908499104</guid><description>Passed by Reference&lt;br /&gt;&lt;br /&gt;This is an important change. In PHP4, everything was passed by value, including objects. This has changed in PHP5 -- all objects are now passed by reference.&lt;br /&gt;&lt;br /&gt;$joe = new Person();&lt;br /&gt;$joe-&gt;sex = 'male';&lt;br /&gt;&lt;br /&gt;$betty = $joe;&lt;br /&gt;$betty-&gt;sex = 'female';&lt;br /&gt;&lt;br /&gt;echo $joe-&gt;sex; // Will be 'female'  &lt;br /&gt;&lt;br /&gt;The above code fragment was common in PHP4. If you needed to duplicate an object, you simply copied it by assigning it to another variable. But in PHP5 you must use the new clone keyword.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>what is MVC? why its been used?</title><link>http://phpfaqs.blogspot.com/2011/10/what-is-mvc-why-its-been-used.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sun, 2 Oct 2011 23:58:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-7358985250706516476</guid><description>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. &lt;br /&gt;&lt;br /&gt;WHY ITS NEEDED IS &lt;br /&gt;1 Modular separation of function &lt;br /&gt;2 Easier to maintain &lt;br /&gt;3 View-Controller separation means:&lt;br /&gt;      A â€” Tweaking design (HTML) without altering code B â€” Web design staff can modify UI without understanding code.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>what is garbage collection? default time ? refresh time?</title><link>http://phpfaqs.blogspot.com/2011/10/what-is-garbage-collection-default-time.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sun, 2 Oct 2011 23:56:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-7579568960843110010</guid><description>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</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What are the advantages and disadvantages of Cascading Style Sheets?</title><link>http://phpfaqs.blogspot.com/2011/10/what-are-advantages-and-disadvantages.html</link><category>CSS</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sun, 2 Oct 2011 23:26:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-4073717727543205152</guid><description>External Style Sheets:&lt;br /&gt;Advantages &lt;br /&gt;Can control styles for multiple documents at once. Classes can be created for use on multiple HTML element types in many documents. Selector and grouping methods can be used to apply styles under complex contexts.&lt;br /&gt;&lt;br /&gt;Disadvantages&lt;br /&gt;An 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 definitions.&lt;br /&gt;&lt;br /&gt;Embedded Style Sheets&lt;br /&gt;&lt;br /&gt;Advantages:&lt;br /&gt;Classes can be created for use on multiple tag types in the document. Selector and grouping methods can be used to apply styles under complex contexts. No additional downloads necessary to receive style information.&lt;br /&gt;&lt;br /&gt;Disadvantages:&lt;br /&gt;This method can not control styles for multiple documents at once&lt;br /&gt;&lt;br /&gt;Inline Styles&lt;br /&gt;&lt;br /&gt;Advantages:&lt;br /&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;br /&gt;&lt;br /&gt;Disadvantages:&lt;br /&gt;Does not distance style information from content (a main goal of SGML/HTML). Can not control styles for multiple documents at once. 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.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>About Phing</title><link>http://phpfaqs.blogspot.com/2008/07/about-phing.html</link><category>PEAR</category><category>phing</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 9 Jul 2008 20:01:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-8134257113506090818</guid><description>&lt;span style="font-weight:bold;"&gt;what is phing?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Phing is at heart a PHP clone of Ant, another common build and deployment tool.&lt;br /&gt;&lt;br /&gt;Phing is a project build system based on Apache ant [ant]. You can do anything with Phing that you could do with a traditional build system like Gnu make [gnumake], and Phing's use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How it works?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Phing uses XML buildfiles that contain a description of the things to do. The buildfile is structured into targets that contain the actual commands to perform (e.g. commands to copy a file, delete a directory, perform a DB query, etc.). So, to use Phing, you would first write your buildfile and then you would run phing, specifying the target in your buildfile that you want to execute.&lt;br /&gt;&lt;br /&gt;% phing -f mybuildfile.xml mytarget&lt;br /&gt;&lt;br /&gt;By default Phing will look for a buildfile named build.xml (so you don't have to specify the buildfile name unless it is not build.xml) and if no target is specified Phing will try to execute the default target, as specified in the &lt;project&gt; tag.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;You can install Phing as follows.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;pear channel-discover pear.phing.info&lt;br /&gt;pear install phing/phing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Calling Phing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Command Line&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Phing execution on the command line is simple. Just change to the directory where your buildfile resides and type&lt;br /&gt;&lt;br /&gt;$ phing [targetname]&lt;br /&gt;&lt;br /&gt;at the command line (where [targetname] is the target you want to be executed)</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>What are the differences between procedure-oriented languages and object-oriented languages?</title><link>http://phpfaqs.blogspot.com/2008/03/what-are-differences-between-procedure.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Mon, 31 Mar 2008 02:16:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-1538320650263567354</guid><description>Traditional programming has the following characteristics:Functions are written sequentially, so that a change in programming can affect any code that follows it. If a function is used multiple times in a system (i.e., a piece of code that manages the date), it is often simply cut and pasted into each program (i.e., a change log, order function, fulfillment system, etc).If a date change is needed (i.e., Y2K when the code needed to be changed to handle four numerical digits instead of two), all these pieces of code must be found, modified, and tested. Code (sequences of computer instructions) and data (information on which the instructions operates on) are kept separate. Multiple sets of code can access and modify one set of data. One set of code may rely on data in multiple places. Multiple sets of code and data are required to work together. Changes made to any of the code sets and data sets can cause problems through out the system.Object-Oriented programming takes a radically different approach:Code and data are merged into one indivisible item – an object (the term “component” has also been used to describe an object.) An object is an abstraction of a set of real-world things (for example, an object may be created around “date”) The object would contain all information and functionality for that thing (A date object it may contain labels like January, February, Tuesday, Wednesday. &lt;br /&gt;&lt;br /&gt;It may contain functionality that manages leap years, determines if it is a business day or a holiday, etc., See Fig. 1). Ideally, information about a particular thing should reside in only one place in a system. The information within an object is encapsulated (or hidden) from the rest of the system.&lt;br /&gt;&lt;br /&gt;A system is composed of multiple objects (i.e., date function, reports,order processing, etc., See Fig 2). When one object needs information from another object, a request is sent asking for specific information.(for example, a report object may need to know what today’s date is and will send a request to the date object) These requests are called messages and each object has an interface that manages messages. &lt;br /&gt;&lt;br /&gt;OO programming languages include features such as “class”, “instance”,“inheritance”, and “polymorphism” that increase the power and flexibility of an object.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What are the features and advantages of object-oriented programming?</title><link>http://phpfaqs.blogspot.com/2008/03/what-are-features-and-advantages-of.html</link><category>object-oriented programming</category><category>oops</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Mon, 31 Mar 2008 02:09:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-841669367268633722</guid><description>One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system&lt;br /&gt;because it appeals to natural human cognition patterns.For some systems, an OO approach can speed development time since many&lt;br /&gt;objects are standard across systems and can be reused. Components thatmanage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>XMLHttpRequest Properties</title><link>http://phpfaqs.blogspot.com/2008/01/xmlhttprequest-properties.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 16 Jan 2008 13:55:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-1390558835135086597</guid><description>• &lt;span style="font-weight:bold;"&gt;onreadystatechange&lt;/span&gt;&lt;br /&gt;– Event handler that fires at each state change&lt;br /&gt;– You implement your own function that handles this&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;readyState&lt;/span&gt; – current status of request&lt;br /&gt;– 0 = uninitialized&lt;br /&gt;– 1 = loading&lt;br /&gt;– 2 = loaded&lt;br /&gt;– 3 = interactive (some data has been returned)&lt;br /&gt;• This is broken in IE right now&lt;br /&gt;– 4 = complete&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;status&lt;/span&gt;&lt;br /&gt;– HTTP Status returned from server: 200 = OK&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;responseText&lt;/span&gt;&lt;br /&gt;– String version of data returned from server&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;responseXML&lt;/span&gt;&lt;br /&gt;– XML DOM document of data returned&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;statusText&lt;/span&gt;&lt;br /&gt;– Status text returned from server</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Methods available in XMLHttpRequest Object</title><link>http://phpfaqs.blogspot.com/2008/01/methods-available-in-xmlhttprequest.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 16 Jan 2008 13:52:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-3745550669910184289</guid><description>• &lt;span style="font-weight:bold;"&gt;open(“method”, “URL”)&lt;/span&gt;&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;open(“method”, “URL”, async, username, password)&lt;/span&gt;&lt;br /&gt;– Assigns destination URL, method, etc.&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;send(content)&lt;/span&gt;&lt;br /&gt;– Sends request including postable string or DOM object data&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;abort()&lt;/span&gt;&lt;br /&gt;– Terminates current request&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;getAllResponseHeaders()&lt;/span&gt;&lt;br /&gt;– Returns headers (labels + values) as a string&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;getResponseHeader(“header”)&lt;/span&gt;&lt;br /&gt;– Returns value of a given header&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;setRequestHeader(“label”,”value”)&lt;/span&gt;&lt;br /&gt;– Sets Request Headers before sending</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>why is AJAX so hot—NOW?</title><link>http://phpfaqs.blogspot.com/2008/01/why-is-ajax-so-hotnow.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 16 Jan 2008 13:49:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-1662405732208562300</guid><description>• Demand for richer applications is growing&lt;br /&gt;– Broadband means we can—and want to—do more&lt;br /&gt;• It has a name&lt;br /&gt;– Think LAMP—helped solidify the thoughts/techniques in people’s&lt;br /&gt;minds&lt;br /&gt;• Recent Google applications have sparked people’s imagination&lt;br /&gt;– Google gmail, Google suggests, Google Maps&lt;br /&gt;• People are thinking of building APPLICATIONS…not just sites&lt;br /&gt;• The Tipping Point&lt;br /&gt;– All of this has made rich internet apps reach its tipping point—&lt;br /&gt;where adoption spreads rapidly and dramatically</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Definition - AJAX</title><link>http://phpfaqs.blogspot.com/2008/01/definition-ajax.html</link><category>define AJAX</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 16 Jan 2008 13:35:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-4407716892933998729</guid><description>Asynchronous Javascript and XML&lt;br /&gt;&lt;br /&gt;• AJAX is not a new technology&lt;br /&gt;     – Google calls their technique: Javascript&lt;br /&gt;     – Also known as XMLHTTP technique&lt;br /&gt;     – In use since at least 1997&lt;br /&gt;• A bundle of techniques&lt;br /&gt;     – XML data interchange only&lt;br /&gt;     – Passing Javascript methods to client&lt;br /&gt;     – DHTML widgets&lt;br /&gt;     – XML &amp; XSLTs&lt;br /&gt;• Core techniques are centered on asynchronous communication to the server without a page refresh</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between echo() and print()</title><link>http://phpfaqs.blogspot.com/2008/01/difference-between-echo-and-print.html</link><author>noreply@blogger.com (Pictures Online)</author><pubDate>Thu, 3 Jan 2008 01:20:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-3818309343618878576</guid><description>&lt;strong&gt;speed: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;echo() is faster than print(). Because print() behave like a function. So it set a return value. But echo() doesn't set a return value.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Parameter:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;echo() can take multiple parameters. But print() can take only one parameter.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>MySql Questions and Answers - part2</title><link>http://phpfaqs.blogspot.com/2007/12/mysql-questions-and-answers-part2.html</link><category>AES_DECRYPT</category><category>AES_ENCRYPT</category><category>LOAD DATA INFILE</category><category>SET function of MySQL</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Wed, 26 Dec 2007 23:04:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-6331951426002371848</guid><description>&lt;span style="font-weight:bold;"&gt;How many values can the SET function of MySQL take?&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;MySQL SET function can take zero or more values, but at the maximum it can take 64 values. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;How can I load data from a text file into a table?&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;The MySQL provides a LOAD DATA INFILE command. You can load data from a file. Great tool but you need to make sure that:&lt;br /&gt;&lt;br /&gt;a) Data must be delimited&lt;br /&gt;b) Data fields must match table columns correctly&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How many ways we can we find the current date using MySQL?&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;SELECT CURDATE();&lt;br /&gt;SELECT CURRENT_DATE();&lt;br /&gt;SELECT CURTIME();&lt;br /&gt;SELECT CURRENT_TIME();&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;How can we encrypt and decrypt a data presented in a table using MySQL? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can use functions: AES_ENCRYPT() and AES_DECRYPT() like: &lt;br /&gt;&lt;br /&gt;AES_ENCRYPT(str, key_str)&lt;br /&gt;AES_DECRYPT(crypt_str, key_str)</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>what are the different types of errors in PHP?</title><link>http://phpfaqs.blogspot.com/2007/12/what-are-different-types-of-errors-in.html</link><category>Errors Types In PHP</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 15 Dec 2007 10:53:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-2247415287189744067</guid><description>Here are three basic types of runtime errors in PHP:&lt;br /&gt;&lt;br /&gt;1. &lt;strong&gt;Notices:&lt;/strong&gt; These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although you can change this default behavior.&lt;br /&gt;&lt;br /&gt;2. &lt;strong&gt;Warnings:&lt;/strong&gt; These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.&lt;br /&gt;&lt;br /&gt;3. &lt;strong&gt;Fatal errors:&lt;/strong&gt; These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behavior is to display them to the user when they take place.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What is meant by PEAR in php?</title><link>http://phpfaqs.blogspot.com/2007/12/what-is-meant-by-pear-in-php.html</link><category>PEAR</category><category>PHP Extension Community Library</category><category>PHP Foundation Classes</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sat, 15 Dec 2007 10:41:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-8038141982980527114</guid><description>PEAR is short for "PHP Extension and Application Repository" and is pronounced just like the fruit.&lt;br /&gt;&lt;br /&gt;The purpose of PEAR is to provide: &lt;br /&gt;A structured library of open-sourced code for PHP users &lt;br /&gt;A system for code distribution and package maintenance &lt;br /&gt;A standard style for code written in PHP &lt;br /&gt;The PHP Foundation Classes (PFC), &lt;br /&gt;The PHP Extension Community Library (PECL), &lt;br /&gt;&lt;br /&gt;A web site, mailing lists and download mirrors to support the PHP/PEAR community &lt;br /&gt;PEAR is a community-driven project with the PEAR Group as the governing body. The project has been founded by Stig S. Bakken in 1999 and quite a lot of people have joined the project since then.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What is the difference between GROUP BY and ORDER BY in SQL?</title><link>http://phpfaqs.blogspot.com/2007/12/what-is-difference-between-group-by-and.html</link><category>GROUP BY</category><category>ORDER BY</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Thu, 13 Dec 2007 02:02:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-6259884578986890263</guid><description>To sort a result, use an ORDER BY clause.&lt;br /&gt; &lt;br /&gt;The most general way to satisfy a GROUP BY clause is to scan the whole table and create a new temporary table where all rows from each group are consecutive, and then use this temporary table to discover groups and apply aggregate functions (if any).&lt;br /&gt;&lt;br /&gt;ORDER BY [col1],[col2],...[coln]; Tells 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.&lt;br /&gt;&lt;br /&gt;GROUP BY [col1],[col2],...[coln]; Tells DBMS to group (aggregate) 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.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Explain normalization?</title><link>http://phpfaqs.blogspot.com/2007/12/explain-normalization.html</link><category>First Normal Form</category><category>normalization</category><category>Second Normal Form</category><category>Third Normal Form</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Thu, 13 Dec 2007 01:50:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-8246091038530081619</guid><description>The normalization process involves getting our data to conform to three progressive normal forms&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;First Normal Form&lt;/strong&gt;&lt;br /&gt;The First Normal Form (or 1NF) involves removal of redundant data 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). &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Second Normal Form&lt;/strong&gt;&lt;br /&gt;Where 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. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Third Normal Form&lt;/strong&gt;&lt;br /&gt;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</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Mysql Questions and Answers - part1</title><link>http://phpfaqs.blogspot.com/2007/12/mysql-questions-and-answers-part1.html</link><category>MyISAM</category><category>Mysql</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Thu, 13 Dec 2007 01:25:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-7925116690641093753</guid><description>&lt;strong&gt;What is the difference between mysql_fetch_object and mysql_fetch_array? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the different tables present in MySQL? Which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10))?&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Total 5 types of tables we can create&lt;br /&gt;1. MyISAM&lt;br /&gt;2. Heap&lt;br /&gt;3. Merge&lt;br /&gt;4. INNO DB&lt;br /&gt;5. ISAM&lt;br /&gt;MyISAM is the default storage engine as of MySQL 3.23. When you fire the above create query MySQL will create a MyISAM table. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In MySQL, the default table type is MyISAM.&lt;br /&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;br /&gt;&lt;br /&gt;The '.frm' file stores the table definition.&lt;br /&gt;The data file has a '.MYD' (MYData) extension.&lt;br /&gt;The index file has a '.MYI' (MYIndex) extension,&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a select query that will be displayed the duplicated site name and how many times it is duplicated? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SELECT sitename, COUNT(*) AS NumOccurrences&lt;br /&gt;FROM tbl_sites&lt;br /&gt;GROUP BY sitename HAVING COUNT(*) &gt; 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the differences between DROP a table and TRUNCATE a table?&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;DROP TABLE table_name - This will delete the table and its data.&lt;br /&gt;&lt;br /&gt;TRUNCATE TABLE table_name - This will delete the data of the table, but not the table definition.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Give the syntax of GRANT commands? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The generic syntax for GRANT is as following&lt;br /&gt;&lt;br /&gt;GRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password]&lt;br /&gt;&lt;br /&gt;Now rights can be:&lt;br /&gt;a) ALL privilages&lt;br /&gt;b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.&lt;br /&gt;&lt;br /&gt;We can grant rights on all databse by usingh *.* or some specific database by database.* or a specific table by database.table_name. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the difference between CHAR and VARCHAR data types? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, "Hello!" will be stored as "Hello! " in CHAR(10) column. &lt;br /&gt;&lt;br /&gt;VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, "Hello!" will be stored as "Hello!" in VARCHAR(10) column.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How can I execute a PHP script using command line?</title><link>http://phpfaqs.blogspot.com/2007/12/how-can-i-execute-php-script-using.html</link><category>PHP script command line</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Thu, 13 Dec 2007 01:22:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-4938950271793853014</guid><description>Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program. &lt;br /&gt;Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>difference between get and post?</title><link>http://phpfaqs.blogspot.com/2007/12/difference-between-get-and-post.html</link><category>get</category><category>post</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Tue, 11 Dec 2007 23:34:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-7355302719757768829</guid><description>A GET request is a request to get a resource from the server. Choosing GET as the "method" will append all of the data to the URL and it will show up in the URL bar of your browser. The amount of information you can send back using a GET is restricted as URLs can only be 1024 characters.&lt;br /&gt;&lt;br /&gt;A POST request is a request to post (to send) form data to a resource on the server. &lt;br /&gt;&lt;br /&gt;A POST on the other hand will (typically) send the information through a socket back to the webserver and it won't show up in the URL bar. You can send much more information to the server this way - and it's not restricted to textual data either. It is possible to send files and even binary data such as serialized Java objects!&lt;br /&gt;&lt;br /&gt;The GET method appends name/value pairs to the URL. Unfortunately, the length of a URL is limited, so this method only works if there are only a few parameters. The URL could be truncated if the form uses a large number of parameters, or if the parameters contain large amounts of data. Also, parameters passed on the URL are visible in the address field of the browser not the best place for a password to be displayed.&lt;br /&gt;&lt;br /&gt;The POST method packages the name/value pairs inside the body of the HTTP request, which makes for a cleaner URL and imposes no size limitations on the forms output. It is also more secure.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What is the difference between session and cookie?</title><link>http://phpfaqs.blogspot.com/2007/12/what-is-difference-between-session-and.html</link><category>$_session and $_cookie</category><category>cookie</category><category>session</category><author>noreply@blogger.com (Pictures Online)</author><pubDate>Sun, 9 Dec 2007 11:13:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8289169589087225162.post-2312308589173956663</guid><description>1. The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not.&lt;br /&gt;&lt;br /&gt;2.A cookie can keep information in the user's browser until deleted. But Session work instead like a token allowing access and passing information while the user has their browser open.&lt;br /&gt;&lt;br /&gt;3.The difference between sessions and cookies is that a session can hold multiple variables, and you don’t have to set cookies for every variable. By default, the session data is stored in a cookie with an expiry date of zero, which means that the session only remains active as long as the browser. When you close the browser, all the stored information is lost. You can modify this behavior by changing the “session.cookie_lifetime” setting in “php.ini” from zero to whatever you want the cookie lifetime to be.&lt;br /&gt;&lt;br /&gt;In PHP:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;session_start();&lt;/span&gt; //starts or resumes a function&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;session_destroy();&lt;/span&gt; //ends the session; comment this line and the browser will output the same session ID as before&lt;br /&gt;If you want to remove the registered variables, you need to use the &lt;span style="font-weight:bold;"&gt;session_unset()&lt;/span&gt; function.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>