This will change the name of column:
ALTER TABLE table_name CHANGE old_colm_name new_colm_name
This will change the data type of a column:
ALTER TABLE table_name CHANGE colm_name same_colm_name [new data type]
PHP is an important part of the web world, and every web developer should have the basic knowledge in PHP. Common PHP questions, which should help you become a best PHP developer.
This will change the name of column:
ALTER TABLE table_name CHANGE old_colm_name new_colm_name
This will change the data type of a column:
ALTER TABLE table_name CHANGE colm_name same_colm_name [new data type]
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. …
Answer 1:
mysql_fetch_array() -> Fetch a result row as a combination of associative array and regular array.
mysql_fetch_object() -> Fetch a result row as an object.
mysql_fetch_row() -> Fetch a result set as a regular array().
Session depends on browser. If browser is closed then session is lost. The session data will be deleted after session time out. If connection is lost and you recreate connection, then session will continue in the browser.
Data is stored in name.myd
Table structure is stored in name.frm
Index is stored in name.myi
PHP4 cannot support oops concepts and Zend engine 1 is used.
PHP5 supports oops concepts and Zend engine 2 is used.
Error supporting is increased in PHP5.
XML and SQLLite will is increased in PHP5.
Yes we can include that many times we want, but here are some things to make sure of:
(including “abc.php”, the file names are case-sensitive)
there shouldn’t be any duplicate function names, means there should not be functions or classes or variables with the same name in “abc.php” and “bcd.php”
Anwser :
nl2br() inserts a HTML tag <br> before all new line characters \n in a string.
echo nl2br(“welcome to \n PHP”);
output:
welcome to<br>
PHP
For this purpose, you can first read the data from one server into session variables. Then connect to other server and simply insert the data into the database.
mysql_fetch_array – Fetch a result row as an associative array, a numeric array, or both
mysql_fetch_assoc – Fetch a result row as an associative array
mysql_fetch_object – Fetch a result row as an object
mysql_fetch_row —- Get a result row as an enumerated array