Hello,
Are you using MySQL database for your final year software project? Is yes, I would like to remind you the following, very important point!
Never use this! Functions starting with mysql_ are no more supported and you should use PDO.
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases.
PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you're using an older version of the mysql client libraries, PDO will emulate them for you.
Example Query using PDO:
Source: http://php.net/manual/en/ref.pdo-mysql.php
Detailed Installation instruction, configuration and example codes are available at this PHP Official website URL
If you have questions, feel free to ask me.
Are you using MySQL database for your final year software project? Is yes, I would like to remind you the following, very important point!
PHP Code:
mysql_connect('localhost', 'user', 'pass') or die('DB error'. mysql_error());
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases.
PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you're using an older version of the mysql client libraries, PDO will emulate them for you.
Example Query using PDO:
PHP Code:
<?php
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
$stmt = $db->prepare('select * from foo',
array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
} else {
die("my application only works with mysql; I should use \$stmt->fetchAll() instead");
}
?>
Source: http://php.net/manual/en/ref.pdo-mysql.php
Detailed Installation instruction, configuration and example codes are available at this PHP Official website URL
If you have questions, feel free to ask me.