----在这里,复制ntwdblib.dll到c:windowssystem32下是失败,原因是该目录下已经存在该dll文件啦.
我重启apache,
*/
$hostname="10.4.250.20";
$dbuser="hr";
$dbpasswd="946138";
$dbname="hr";
$conn = mssql_connect($hostname,$dbuser,$dbpasswd) or die("数据库连接错误!");
mssql_select_db($dbname,$conn);
$sql = " select * from pip_staff_s where cstaffid ='z797' ";
$rowset=mssql_query($sql,$conn);
$rowcnt=mssql_num_row($rowset);
echo " rows ";
echo $rowset;
echo " end ";
代码如下 | 复制代码 |
function into_sql($file) if( mysql_get_server_info() < '4.1' ) |
?>
文章提供一款备份还原函数这是利用php写的可以备份也可以还原的函数,同时也支持备份后保存到本地的代码哦,好了下面看源码。//备份还原函数
代码如下 | 复制代码 |
function write_file($sql,$filename) { header("content-disposition: ".(strpos($_server['http_user_agent'], 'msie') ? 'inline; ' : 'attachment; ')."filename=".$filename); header("content-length: ".strlen($sql)); header("expires: 0"); function writeable($dir){ function make_header($table){ function make_record($table,$num_fields){ function show_msg($msgs){ function pageend(){ function import($fname) { |
代码如下 | 复制代码 |
class dbstuff { if($this->version() > '4.1') { if($dbcharset) { if($this->version() > '5.0.1') { if($dbname) { } function select_db($dbname) { function fetch_array($query, $result_type = mysql_assoc) { function query($sql, $type = '') { $func = $type == 'unbuffered' && @function_exists('mysql_unbuffered_query') ? $this->querynum++; function affected_rows() { function error() { function errno() { function result($query, $row) { function result_first($sql) { function num_rows($query) { function num_fields($query) { function free_result($query) { function insert_id() { function fetch_row($query) { function fetch_fields($query) { function version() { function close() { function nr($sql_id="") { function nf($sql_id="") { function nextrecord($sql_id="") { function f($name) { function lock($tblname,$op="write") { function unlock() function ar() { function i_id() { function halt($message = '', $sql = '') { ?> |
代码如下 | 复制代码 |
*/ /** return $this -> conn; /** $this -> querynum++; /** /** /** /** /** /** /** function close() { /** /** /** ?> |