MySQL is an open source project just like PHP so that's why it has gained so popularity in such a short span of time.
There are Few stages when creating a php application which is going to interact with MySQL.
- You will need to know the mysql server username and password.
 - You will need to know the mysql server URL / IP address
 - You will need to know the database you will be handling/updating.
 
- Tell the PHP script about your mysql server and database
 - Send a sql command to insert/update/delete data
 - Send a sql command to retrieve data
 - Manipulate the data according to user requirements
 
Important functions required to interact with a mysql server
- mysql_connect() - to create an active link to mysql server
 - mysql_select_db() to select the database on a mysql server
 - mysql_query() - to send a sql command to mysql server.
 - mysql_close() - to close mysql server connection.
 
Let's connect to our DB in Vertrigo. After running vertrigo application go to
- Run vertrigo application
 - go to http://localhost/phpmyadmin/
 - create new database
 - create new tables in database. // it must not be so tought
 
No comments:
Post a Comment