background image

        

private

 

function

 showCurPage(){

            

$this

->limitStr = ' LIMIT '.((

$this

->curPage - 1)* 

$this

->dispNum).','.

$this

->dispNum;

            

//echo $this->queryStr.$this->limitStr;

            

$result

 = mysql_query(

$this

->queryStr.

$this

->limitStr);

 

            

if

 (!

$result

)

            

{            

                

if

 (

$this

->totalPages > 0)

                

{

                    echo

 '查询出错'.'<br>';

                

}

                

else

                

{

                    echo

 '无数据'.'<br>';

                

}

                

return

;

            

}

            

$cols

 = mysql_num_fields(

$result

);

 

            echo

 '<table border="1">';

            echo

 '<tr>';

            

for

(

$i

=0; 

$i

<

$cols

$i

++)

            

{

                echo

 '<th>';

                echo

 mysql_field_name(

$result

$i

);

                echo

 '</th>';

            

}

            echo

 '</tr>';

 

            

while

(

$row

 = mysql_fetch_assoc(

$result

))

            

{

                echo

 '<tr>';

                

foreach

(

$row

 

as

 

$key

=>

$value

)

                

{

                    echo

 '<td>';

                    echo

 

$value

;

                    echo

 '</td>';

                

}

                echo

 '</tr>';

            

}

 

            echo

 '</table>';

        

}