Transact-SQL – Operators
- + (Add):
Adds two numbers. This addition arithmetic operator can also add a number, in days, to a date.SELECT c.FirstName, c.LastName, VacationHours, SickLeaveHours, VacationHours + SickLeaveHours AS 'Total Hours Away' FROM HumanResources.Employee AS e JOIN Person.Contact AS c ON e.ContactID = c.ContactID
Update Word document through PHP
$filename = “C:\\document_”.date(“YmdHis”).”.doc”;
$template = “C:\\template.htm”;
$fp_temp = fopen($template, “rb”);
$fp = fopen($filename, “wb”);
$old_contents = fread ( $fp_temp, filesize ($template));
fclose ( $fp_temp);
$new_constants = str_replace(“var_username”, “Deepak”, $old_contents);
$rset = “<table width=’100%’ ><tr><td>#</td><td >Name</td><td >Date of Join</td><td >Title</td><td >Dept</td></tr>”;
$rset .= “<tr><td>123</td><td>Deepak</td><td>Oct 10, 2003</td><td>Programmer</td><td>IT</td></tr>”;
$rset .= “<tr><td>123</td><td>Sachin</td><td>Oct 10, 2005</td><td>Developer</td><td>IT</td></tr>”;
$rset .= “<tr><td>123</td><td>Amita</td><td>Oct 10, 2006</td><td>System Admin</td><td>HR & Admin</td></tr>”;
$rset .= “<tr><td>123</td><td>Deepa</td><td>Oct 10, 2002</td><td>Hr Head</td><td>HR & Admin</td></tr>”;
$rset .= “<tr><td>123</td><td>Poja</td><td>Oct 10, 2003</td><td>Developer</td><td>IT</td></tr></table>”;
$constants = str_replace(“Var_record_sets”, $rset, $new_constants);
fwrite($fp, $constants) ;
-
Archives
- May 2007 (1)
- February 2007 (1)
- December 2006 (7)
-
Categories
-
RSS
Entries RSS
Comments RSS
