You are on page 1of 5


Connecting to server using mysql To connect to the server, you will usually need to provide a MySQL user name when you invoke mysql and, most likely, a password. If the server runs on a machine other than the one where you log in, you will also need to specify a host name. Contact your administrator to find out what connection parameters you should use to connect (that is, what host, user name, and password to use). Once you know the proper parameters, you should be able to connect like this:

shell> mysql -h host -u user -p Enter password: ********
host and user represent the host name where your MySQL server is running and the user name of your MySQL account. Substitute appropriate values for your setup. The ******** represents your password; enter it when mysql displays the Enter password: prompt. If that works, you should see some introductory information followed by a mysql> prompt:

shell> mysql -h host -u user -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 25338 to server version: standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
The mysql> prompt tells you that mysql is ready for you to enter commands. 2. Selecting records


3. Inserting Records

4. Updating Records

5. Deleting Records

6. Compare PHP to ASP.NET (.asp) and to JSP (.jsp) and Site advantage anddisadvantage Advantage For PHP * Free * Open source * Easier to learn due to its basic scripting language structure and build in functionality * PHP5 now offers many object orientated development concepts * Has many free IDEs available that are very impressive and well supported (e.g. Eclipse) * Runs on Apache server which is open source * Run on IIS 6.0 and IIS 7.0 due to Microsoft’s implementation of FastCGI open standard * Has multiple platform support * Marginally faster due to the overheads imposed by .Net’s Common Language Runtime, which is responsible for intermediate compilation of .Net’s many languages * Has a huge support base as it is open source Disadvantage for PHP * Although it claims to be free, when using free 3rd party add-ons developers often run into issues when developing commercially available applications (i.e. ownership of code / intellectual rights) * Most PHP IDEs require lots of add-ons in-order to add similar functions to Visual Studio * No built in support for AJAX. Requires add-ons. Advantage for ASP.Net

* Can be developed using the stunning Visual Studio.Net IDE that offers vast array of features, that make coding much easier and development more productive * Developers can download a free scaled down version of Visual Studio that offers an impressive array of features. This is aimed at students and hobbyists * Runs on IIS (Internet Information Services) * Applications can be written using many programming languages (e.g VB.Net, C#, J#, C++ COBAL) * The .Net framework (the engine that ASP.Net is runs on) has more sophisticated error handling capabilities than PHP * Allows better separation of design and application logic using of code-behind pages and usercontrols * Has built support for AJAX as of .Net Framework 3.5 Disadvantage for ASP.Net * Requires a Microsoft licenses * Requires a basic knowledge of object orientated concepts which can sometimes deter newbie developers * Single platform and will only run on Microsoft web servers These bullet points emphasise some of the main differences, advantages and disadvantages of the two languages.

Function / Feature Programming Approach

JSP Completely object oriented Advantage: Clean code Disadvantage: Too descriptive

PHP Scripting with object oriented support Advantage: Functional and quick coding, you can use OOP practices at your convenience

String and data manipulation Web Oriented features 1. 2. 3. 4. 5. Includes Mails File Uploads Form Handling Sessions

Disadvantage: May get clumsy Rich library, too much Rich functionality. Functional descriptive and object oriented and easy coding. code Almost everything is built in or Inbuilt functionality. Easy to supported by libraries. use functions, written for the Complicated and too much of specific tasks code.

Database Access features

Standard JDBC structure/ Use EJB/ Struts framework built over JDBC. Descriptive and too much overhead or boiler plate code involved. Uses the same API for

Dedicated inbuilt libraries for most of the commonly used databases. Very tight integration with MySQL and PostGRESQL. Very minimal

all databases using JDBC drivers


Use standard SAX/DOM parsers. Too much boiler plate code involved. Well defined APIs and stable implementations are available for XSL and XPATH Java Classes and Libraries. Run’s in sandbox and hard JNI approach needed to integrate with server programs.


Dynamic Graphics/PDF and bells and whistles Web Services/SOAP Portals

Almost everything has a readymade library Addon Libraries like Axis, JAXWS, etc. Spec JSR-168 and 286 Many different frameworks

boiler plate code required. The libraries and results are straight forward and easy to use. SAX and DOM parsers available are easy to use and to the point. Another library, Simple XML provides very easy OO approach to handling XML data. XSL and XPATH functionality is also built in. PHP/C/Any thing executable by the underlying OS platform. Can very easily interact with programs on the server. Very good support for native code. Supported internally or though libraries. In Built Portal