麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
oracle中的一个程序,如何让它移植到MSSQL中
悬赏分:20 - 2007年08月18日

<?PHP require_once("function.php"); session_start(); ?> 视听留言 <?php $pageSize= 10; //每页显示的记录数 $hostname = "192.168.0.2"; //MSSQL Server $dbuser = "sa"; //用户名 $dbpasswd = ""; //密码 //连接数据库 $conn = mssql_connect($hostname,$dbuser,$dbpasswd) or die("无法连接数据库服务器!"); //选择数据库 $db = mssql_select_db("unicom",$conn) or die("无法连接数据库!"); if(!intval($_REQUEST['page'])) { $page = $_POST['page']; } else $page = $_REQUEST['page']; if(empty($page)|| $page<1) $page = 1; $maxpage = 10; $current_page = $page; if($conn->_connect()) { if($_POST['content']) $total_Record = $conn-> _get_Field("select count(*) from info_received WHERE src_phone LIKE '%".$_POST['content']."%'",0); else $total_Record = $conn-> _get_Field("SELECT COUNT(*) FROM info_received where time>convert(varchar(15),getdate()-day(30),112 )and time0) $total_pages = intval($total_Record/$maxpage)+1; else $total_pages = intval($total_Record/$maxpage); if($_POST['content']) $sql ="SELECT * FROM (select * from info_received where src_phone LIKE '%".str_replace("\\\\","\\",$_POST['content'])."%' AND rownum<'".(($current_page-1)*$maxpage+$maxpage)."' minus select * from info_received WHERE src_phone Like '%".str_replace("\\\\","\\",$_POST['content'])."%' and rownum<'".(($current_page-1)*$maxpage)."')"; else $sql ="select * from (SELECT * FROM (select * from (select * from info_recdived where (time between (sysdate-90) and sysdate) order by time desc)) where rownum<'".(($current_page-1)*$maxpage+$maxpage)."' minus (select * from (select * from info_received WHERE (time between (sysdate-90) and sysdate) order by time desc) where rownum<'".(($current_page-1)*$maxpage)."')) order by time desc"; // write_log( "TES:".$sql ); $pd-> _executeQuery( $sql ); if($_POST['content1']) $sql ="SELECT * FROM (select * from info_received where name LIKE '%".str_replace("\\\\","\\",$_POST['content'])."%' AND rownum<'".(($current_page-1)*$maxpage+$maxpage)."' minus select * from info_received WHERE name Like '%".str_replace("\\\\","\\",$_POST['content'])."%' and rownum<'".(($current_page-1)*$maxpage)."')"; else $sql ="select * from (SELECT * FROM (select * from (select * from TB_VOICEMSG where (CREATETIIME between (sysdate-90) and sysdate) order by CREATETIIME desc)) where rownum<'".(($current_page-1)*$maxpage+$maxpage)."' minus (select * from (select * from TB_VOICEMSG WHERE (CREATETIIME between (sysdate-90) and sysdate) order by CREATETIIME desc) where rownum<'".(($current_page-1)*$maxpage)."')) order by CREATETIIME desc"; $pd-> _executeQuery( $sql ); $i = 0; while($rs = @mssql_fetch_array( $pd->_get_R_handle(), mssql_BOTH )) { if($i++>10) break; //echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } ?> <?php if($current_page==1) print ''; else print ''; if($current_page>=$total_pages) print ''; else print ''; // if($current_page==$total_pages) // print ''; // else // print ''; ?>
手机号码 上行号码 节目代码 上行信息 时间
上一页上一页下一页下一页尾页尾页
手机号码:
节目名称

提问者:kgbpunk   08-18 14:02
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
81 + 87 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM