<?php
define ('hostnameorservername','localhost'); //Your server name or hostname goes in here
define ('serverusername','root'); //Your database username goes in here
define ('serverpassword',''/); //Your database password goes in here
define ('databasenamed','scmplus'); //Your database name goes in here
$mysqli = new mysqli( hostnameorservername, serverusername, serverpassword, databasenamed );
if ($mysqli->connect_errno)
{
printf("Connection failed: %s\n", $mysqli->connect_error);
exit();
}
if (!$mysqli->set_charset("utf8"))
{
printf("Error loading character set utf8: %s\n", $mysqli->error);
exit();
}
if ( !function_exists('mysql_connect') )
{
function mysql_connect( $sql_host, $sql_username, $sql_password )
{
$mysqli_connect = mysqli_connect( $sql_host, $sql_username, $sql_password );
return $mysqli_connect;
}
}
if ( !function_exists('mysql_select_db') )
{
function mysql_select_db( $database, $connection )
{
$mysqli_select_db = mysqli_select_db( $connection, $database );
return $mysqli_select_db;
}
}
if (!function_exists('mysql_real_escape_string'))
{
function mysql_real_escape_string($string)
{
global $mysqli;
if($string){
$real_escape_string = $mysqli->real_escape_string($string);
return $real_escape_string;
}
}
}
if (!function_exists('mysql_query'))
{
function mysql_query($query)
{
global $mysqli;
if($query) {
$result = $mysqli->query($query);
return $result;
}
}
}
if (!function_exists('mysql_fetch_array'))
{
function mysql_fetch_array($result){
if($result){
$row = $result->fetch_assoc();
return $row;
}
}
}
if (!function_exists('mysql_num_rows'))
{
function mysql_num_rows($result){
if($result){
$row_cnt = $result->num_rows;;
return $row_cnt;
}
}
}
if (!function_exists('mysql_free_result'))
{
function mysql_free_result($result)
{
if($result){
global $mysqli;
$result->free();
}
}
}
if (!function_exists('mysql_data_seek'))
{
function mysql_data_seek($result, $offset){
if($result){
global $mysqli;
return $result->data_seek($offset);
}
}
}
if (!function_exists('mysql_close'))
{
function mysql_close(){
global $mysqli;
return $mysqli->close();
}
}
if (!function_exists('mysql_insert_id'))
{
function mysql_insert_id(){
global $mysqli;
$lastInsertId = $mysqli->insert_id;
return $lastInsertId;
}
}
if (!function_exists('mysql_error'))
{
function mysql_error(){
global $mysqli;
$error = $mysqli->error;
return $error;
}
}
?>
Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.
We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.
Copyright © 2011 - 2024 | All Rights Reserved