亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        php+mysql實現(xiàn)數(shù)據(jù)庫隨機重排實例

        字號:


            主要實現(xiàn)代碼如下:
            代碼如下:
            <?php
            //數(shù)據(jù)庫連接就不寫在這里面了
            $s = isset( $_GET['s'] )?$_GET['s']:0;
            $e = isset( $_GET['e'])?$_GET['e']:50;
            $count =85000;
            if( $s < $count )
            {
            $sql = "select * from 表前綴_info where isget =0 order by id desc limit $s,$e ";
            $query = mysql_query( $sql );
            while( $rs = mysql_fetch_array( $query ) )
            {
            $id = $rs['id'];
            $sss = $rs['sss'];
            $typeid = $rs['typeid'];
            $isget = $rs['isget'];
            $sql = "insert into 表前綴_info_bak (id,表前綴,typeid,isget) values('$id','$sss','$typeid','$isget')";
            mysql_query( $sql ) ;
            echo $sql;
            //exit;
            $sqlu = "update 表前綴_info set isget=1 where id =".$rs['id'];
            mysql_query( $sqlu );
            }
            echo '<meta http-equiv="refresh" content="0;url=rand.php?s='.($s+50).'&e=50">正在處理數(shù)據(jù),當前為'.$s.'條......';
            }
            else
            {
            echo '完成所有數(shù)據(jù)處理 <a href=rand.php>再隨機排序一次</a>';
            }
            ?>