Databases Archive

Update by Passing a variable in Query PHP/MySql

Update Command is needed most of the Web applications and CMS Using it with default values specified in query is simple,but Many will have issues with passing a PHP variable in the query The Update Command is of the form UPDATE table_name SET field_name Values WHERE condition If the user has received inputs via post

Read More…

5 Easy Steps to Connect a PHP script to MYSQL

STEP 1: CREATE A CONNECTION First step is we have to create a Connection to hold our database connection. In this step we give details like server information the username and password for the mysql client The PHP Mysql function to connect is 'my_sql_connect() We pass in 3 Parameters the servername,username and password in order.

Read More…

Calculating age from date of birth(dob) Oracle

Caluclating age from date of birth is used in almost all the applications. In Order to calculate this we use trunc() function in Oracle. The trunc function returns a date truncated to a specific unit of measure. To use the present date use the function sysdate. Subtract the system current date and date of birth.

Read More…