PHPBuilder - PHPwithDotNetSqlClient



RSS Twitter
Snippets Databases

PHPwithDotNetSqlClient

by: Himadrish Laha
|
January 10, 2004

Version: 1.0.0.01

Type: Function

Category: Databases

License: GNU General Public License

Description: The files are helpfull with working with .Dot Net SQL-Server client. The above also be integrated with SQL-Server. Development projects under technology in PHP+.Dot Net Sql Client OR PHP+Sql-Server will be get maximum benifit from this codes. all the best. For any query, pls do not hesitate to mail me at himadrish@yahoo.com. Regards, Himadrish Laha



    <p align = "center"><font size = +1><b>Documents Updated</font></b><br>
      <br>
<?
/**
* 
* AUTHOR:		Himadrish Laha himadrish@yahoo.com 
* PROJECT:		
* DESCRIPTION:	How to edit data with sql-server in .dotnet sql clinet
* COPYRIGHT:	Copyright (c) Himadrish Laha, 2004. 
* HISTORY:	
* 
**/
	$dtnow=date("D/M/Y");
	if($operation != "")
	{

		$dbli = mssql_connect("CLIENT15\VSdotNET2003","sa","");
		if ($dbli > 0)
		{
			$dbs = mssql_select_db("Tmp",$dbli);
			if ($dbs)
			{
				$group_qry = "SELECT id from GroupTbl Where Name='$status'";
				$rs_grp_qry = mssql_query($group_qry,$dbli);
				if($row_grp = mssql_fetch_array($rs_grp_qry))
				{
					$statusgrpid=$row_grp["id"];
						if($operation == "Update")
						{
						$my_qry = "UPDATE Document set Description='$descriptnow', GroupId='$statusgrpid', DocDate='$dtnow' WHERE id='$docpkid'";
						//echo $my_qry;
						//exit();
						$usrmsg="Your Documents had been successfully Updated.";
						}
						else if($operation == "Delete")
						{
						$my_qry = "DELETE FROM Document WHERE id='$docpkid' AND GroupId='$docgrpid'";
						//echo $my_qry;
						//exit();
						$usrmsg="Your Documents had been successfully Deleted.";
						}
						else
						{
							$my_qry = "";
							//echo "wrong";
							//exit();
							$usrmsg="<font color=red><b>Unkonw operation.</b></font>";
						}
				
						$result_qry = mssql_query($my_qry,$dbli);
						
					}
					}
		}
			@mssql_close($dbli);
	}
	else
	{
			$usrmsg="<font color=red><b>Unkonw operation.</b></font>";
	}
		?>
  
</body>
</html>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Himadrish Laha

Comment:



Comment:

(Maximum characters: 1200). You have characters left.