PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- class MySQLResultSet {
- private $strSQL;
- private $databasename;
- private $connection;
- private $result;
- public function __construct($strSQL, $databasename, $connection) {
- $this->strSQL = $strSQL;
- $this->databasename = $databasename;
- $this->connection = $connection;
- $msg="No need to use SQL_CALC_FOUND_ROWS.";
- }
- }
- public function __destruct() {
- $this->close();
- }
- public function getRow(){
- }
- public function getDatabaseName(){
- return $this->databasename;
- }
- public function getNumberColums(){
- return musql_num_filds($this->result);
- }
- public function getNumberRow(){
- }
- public function getInsertID(){
- }
- public function getUnlimetdNumberRows(){
- $number = 0;
- if (!$this->checkForSelect()){
- $msg="Illegal method call - not a SELECT query";
- }
- if($end === FALSE){
- }elseif($version < 4) {
- $number = $this->countVersionThree($end);
- }else{
- $number = $this->countVersionFour();
- }
- }
- public function getFildNames(){
- for($i=0; $i<$num; $i++){
- $fildname[$i] = $meta->name;
- }
- }
- return $fildname;
- }
- public function findVersionNumbe(){
- }
- private function checkForSelect(){
- $bln = TRUE;
- $bln = FALSE;
- }
- return $bln;
- }
- private function close(){
- }
- }
- private function countVersionFour(){
- $insertstr = " SQL_CALC_FOUND_ROWS ";
- $tempsql="SELECT FOUND_ROWS()";
- $number=$row[0];
- return $number;
- }
- private function countVersionThree($end){
- $numchars=$end-$start;
- $countsql="SELECT COUNT(*) ";
- $number=$row[0];
- }else{
- $msg="Using keyword DISTINCT, "."calculate total number manually.";
- }
- return $number;
- }
- }
- ?>