This is a discussion on PHP/MySql - A view in the point of Interview within the PHP Programming forums, part of the Web Development category; Hi friends, Here in this thread, guys please post your ideas,queries,answers, suggestions, for people who want to enrich ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi friends, Here in this thread, guys please post your ideas,queries,answers, suggestions, for people who want to enrich their PHP knowledge, also it might help people for their querying knowledge in PHP for interviews. Thanks in Advance.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| Sponsored Links |
| |||
| Let me start with this one. What is the difference between CHAR and VARCHAR data types? 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. 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is the difference between GROUP BY and ORDER BY in SQL? To sort a result, use an ORDER BY clause. 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). ORDER BY [col1],[col2],...[coln]; Tells DBMS according to what columns it should sort the result. If two rows will have the same value in col1 it will try to sort them according to col2 and so on. 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is meant by MIME? Answer 1: MIME is Multipurpose Internet Mail Extensions is an Internet standard for the format of e-mail. However browsers also uses MIME standard to transmit files. MIME has a header which is added to a beginning of the data. When browser sees such header it shows the data as it would be a file (for example image) Some examples of MIME types: audio/x-ms-wmp image/png application/x-shockwave-flash Answer 2: Multipurpose Internet Mail Extensions. WWW's ability to recognize and handle files of different types is largely dependent on the use of the MIME (Multipurpose Internet Mail Extensions) standard. The standard provides for a system of registration of file types with information about the applications needed to process them. This information is incorporated into Web server and browser software, and enables the automatic recognition and display of registered file types.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is the difference between GROUP BY and ORDER BY in SQL? To sort a result, use an ORDER BY clause. 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). ORDER BY [col1],[col2],...[coln]; Tells DBMS according to what columns it should sort the result. If two rows will have the same value in col1 it will try to sort them according to col2 and so on. 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is meant by PEAR in php? Answer1: PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library. PEAR also provides a command-line interface that can be used to automatically install "packages" Answer2: PEAR is short for "PHP Extension and Application Repository" and is pronounced just like the fruit. The purpose of PEAR is to provide: A structured library of open-sourced code for PHP users A system for code distribution and package maintenance A standard style for code written in PHP The PHP Foundation Classes (PFC), The PHP Extension Community Library (PECL), A web site, mailing lists and download mirrors to support the PHP/PEAR community 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| How can we know the number of days between two given dates using PHP? Simple arithmetic: $date1 = date('Y-m-d'); $date2 = '2006-07-01'; $days = (strtotime() - strtotime()) / (60 * 60 * 24); echo "Number of days since '2006-07-01': $days";
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| Hi Sabari, It would be very better, if you post answers for all the above questions, as this thread is mainly for learners and beginners. And if u do all of them would be thankful..
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| Maximum number of rows and columns in a table? MySQL : Maximum number of columns in one table - 3398; size of a table row - 65534 (BLOB and TEXT not included). Oracle : Maximum number of columns in one table - 1000. Up to 32 columns in index key. PostgreSQL : Rows - unlimited, columns - 1600; size of a table row - 1.6TB. Thanks! |
| |||
| How can I load data from a text file into a table? The MySQL provides a LOAD DATA INFILE command. You can load data from a file. Great tool but you need to make sure that: a) Data must be delimited b) Data fields must match table columns correctly
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| How can we know the number of days between two given dates using MySQL? Use DATEDIFF() SELECT DATEDIFF(NOW(),'2006-07-01');
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is meant by PEAR in php? Answer1: PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library. PEAR also provides a command-line interface that can be used to automatically install "packages" Answer2: PEAR is short for "PHP Extension and Application Repository" and is pronounced just like the fruit. The purpose of PEAR is to provide: A structured library of open-sourced code for PHP users A system for code distribution and package maintenance A standard style for code written in PHP The PHP Foundation Classes (PFC), The PHP Extension Community Library (PECL), A web site, mailing lists and download mirrors to support the PHP/PEAR community 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| Will comparison of string "10" and integer 11 work in PHP? Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
| |||
| What is the difference between GROUP BY and ORDER BY in SQL? To sort a result, use an ORDER BY clause. 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). ORDER BY [col1],[col2],...[coln]; Tells DBMS according to what columns it should sort the result. If two rows will have the same value in col1 it will try to sort them according to col2 and so on. 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.
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is a rendezvous point? | Shanthi | Testing Tools | 2 | 11-16-2007 04:41 AM |
| MYSQL - Interview Questions | Murali | Interview Questions & Answers and Tips | 8 | 09-04-2007 08:42 AM |
| MYSQL interview questions | it.wily | Interview Questions & Answers and Tips | 1 | 09-04-2007 04:33 AM |
| what is page check point in QTP? | sundarraja | Testing Tools | 1 | 08-13-2007 04:35 AM |
| Function point | prasath | Software Testing | 1 | 07-17-2007 07:49 AM |