<?
include 'dblib.php';
/**************************************************************************************
Constructor Parameters :
query_process("SQL type" , "Host" , "DB name" , "Username" , "Password" ,"Port");
if Port is not present then,leave that parameter ie
query_process("SQL type" , "Host" , "DB name" , "Username" , "Password");
***************************************************************************************/
$my_sql=new query_process("mysql","localhost","baladb","root","bala");
$ans=$my_sql->query_pass("select * from student","4");
for($i=0; $i<count($ans); $i++){
echo $ans[$i]['name'].'<br>';
}
echo '<hr>';
$ms_sql=new query_process("mssql","localhost","pubs","sa","sysadm");
$ans2=$ms_sql->query_pass("select * from Emp","4");
for($i=0; $i<count($ans2); $i++){
echo $ans2[$i]['name'].'<br>';
}
?>
|