|
1.What is the maximum length for database, table & column names? database- 64 table -64 columns-64 2.what are the commands to find the structure of a MySQL table other than EXPLAIN command? describe table_name 3.what is the difference between char and varchar data types? Set char to occupy n bytes and it will take n bytes even if u r storing avalue of n-m bytes Set varchar to occupy n bytes and it will take only the required space and will not use the n bytes eg. name char(10) will waste 5 bytes if we store ‘testname’, if each char takes a byte eg. name varchar(10) will just use 5 bytes if we store ‘testname’, if each char takes a byte. rest 5 bytes will be free. 4.What is the functionality of md5 function in php? Calculate the md5 hash of a string. The hash is a 32-character hexadecimal number. 5.what is the difference between drop and truncate commands in MySQL? DROP TABLE table_name Will DELETE the table and DATA TRUNCATE TABLE table_name Will DELETE the table DATA not the table definition 6.what is the difference between GROUP BY and ORDER BY in MySQL? 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 7.What is MIME? MIME is Multipurpose Internet Mail Extensions is an internet standard for the format of e-mail. Howewer browsers also uses MIME standart to transmit files. MIME has a header wich is added to a begining of the data. When browser sees such header it shows the data as it would be a file (for example image)
some mimes: audio/x-ms-wmp image/png aplication/x-shockwave-flash 8.Is it possible to pass data from Javascript to PHP? A. Yes, but not without sending another HTTP request. B. Yes, because PHP executes before JavaScript. C. No, because JavaScript is server-side, and PHP is client-side. D. No, because JavaScript executes before PHP. Answer A is correct. Although your instincts might lead you to believe that you cannot pass data from JavaScript to PHP, such a thing can be achieved with another HTTP request. Answer B is incorrect because PHP executing before JavaScript is not what makes this possible.This is actually the characteristic that might lead you to believe (incorrectly) that the answer is no. Answers C and D are incorrect because the answer is yes, but also because the explanations given are false 9.What is session_stara() ? When a user first encounters a page in your application that call ssession start(),a sessionis created for the user.PHP generates a random session identifier to identify the user,and then it sends a set-Cookieheader to the client.By default,the name of this cookie is PHPSESSID,but it is possible to change the cookiename in php.ini or by using the session name() function.On subsequent visits,the client identifies the user with the cookie,and this is how thea application maintains state. What’s foreign data in php? * Anything from a form * Anything from $_GET, $_POST, $_REQUEST * Cookies ($_COOKIES) * Web services data * Files * Some server variables (e.g. $_SERVER['SERVER_NAME']) * Environment variables * Database query results Filter supports get, post, cookies, server and environment variables as well as defined variables (server support may not work in all sapi, for filter 0.11.0 or php 5.2.0).
|