Error message of phpmysql_fetch_array () and mysql_fetch_row ??? This is my paging code.
Function setSQL ($ SQL ){
$ Awal = (! Empty ($ _ GET [$ this-> param1]) & is_numeric ($ _ GET [$ this-> param1])? Intval ($ _ GET [$ this-> param1]): 0;
$ Hal = (! Empty ($ _ GET [$ this-> param2]) & is_numeric ($ _ GET [$ this-> param2])? Intval ($ _ GET [$ this-> param2])-1: 0;
$ Src = (preg_match ("/. + FROM. +/", $ SQL ))? "FROM": "from ";
$ Expsql = substr ($ SQL, strpos ($ SQL, $ src) + strlen ($ src), strlen ($ SQL)-1 );
$ Koneksi = mysql_query ("select count (*) FROM". $ expsql );
$ Having = strpos (strtolower ($ expsql), $ condition_ SQL );
If ($ having = false)
{
List ($ jumlah) = mysql_fetch_row ($ koneksi) // The error message is displayed here.
}
Else
{
$ Jumlah = mysql_num_rows ($ koneksi );
}
$ This-> numRows = $ jumlah;
$ Koneksi = mysql_query ($ SQL. "LIMIT $ awal, $ this-> totalRecordPage ");
$ Data = array ();
While ($ row = mysql_fetch_array ($ koneksi) {// The error message [/color]
$ Data [] = $ row;
}
Call the paging
If ($ day = 6) {// 21
$ Date1 = date ("Y-m-d", mktime (0, 0, 0, date ("m"), date ("d ") -date ("w")-0, date ("Y ")));
$ Date2 = date ("Y-m-d H: I: s", mktime (23, 59, 59, date ("m"), date ("d ") -date ("w") + 0, date ("Y ")));
$ SQL = "SELECT a. period, a. type1, a. type2, a. result, a. open_time FROM mme1 _
}
If ($ day = 7) {// 22
$ Date1 = date ("Y-m-d", mktime (0, 0, 0, date ("m"), date ("d ") -date ("w")-0, date ("Y ")));
$ Date2 = date ("Y-m-d H: I: s", mktime (23, 59, 59, date ("m"), date ("d ") -date ("w") + 0, date ("Y ")));
$ SQL = "SELECT a. period, a. type1, a. type2, a. result, a. open_time FROM mme2 _
}
$ Pg = new Pagging ("resulttext2.php? Page = ". $ _ GET ['Page']." ");
$ Pg-> totalRecordPage = 25;
$ Pg-> setSQL ($ SQL );
It seems
Reply to discussion (solution)
What is the error message? Paste it to see.
What are the errors?
Warning: mysql_fetch_row () expects parameter 1 to be resource, boolean given in S: \ website \ malaysia \ config \ page. inc. php on line 111
Warning: mysql_fetch_array () expects parameter 1 to be resource, boolean given in S: \ website \ malaysia \ config \ page. inc. php on line 127
Two pages are displayed on the page. when I click the second page, an error is reported. when I click View log on the second page, only SELECT COUNT (*) FROM is obtained .... If no statement is followed