I have the following problem, I need to make a paging system to show
results from search on a Mysql database. I found a class that
should do the job but couldn't figure it out how to use it. Does
anybody has an Idea of hos to do this? I thank in advance for any help
you guys can provide me.
?php
// Num of records each time
$NUM_RECORDS = 10;
if ($_GET[pag] == ) {
$ini = 0;
$pag = 1;
}
else {
$ini = ($pag - 1) * $NUM_RECORDS;
}
// Query to show
$query_rsData = SELECT * FROM table LIMIT . $ini . , . $NUM_RECORDS;
$rsData = mysql_query($query_rsData, $DB_CONECTION);
//
Juanjo Pascual wrote:
?php
// Num of records each time
$NUM_RECORDS = 10;
if ($_GET[pag] == ) {
$ini = 0;
$pag = 1;
}
else {
$ini = ($pag - 1) * $NUM_RECORDS;
}
// Query to show
$query_rsData = SELECT * FROM table LIMIT . $ini . , . $NUM_RECORDS;
$rsData =
Andrei wrote:
Since you query all enregs from table why not query all first and
the do mysql_data_seek on result?
// Query to show
$query_rsData = SELECT * FROM {table} ORDER BY {Whatever field};
$rsData = mysql_query($query_rsData, $DB_CONECTION);
$num_total_records = mysql_num_rows(
4 matches
Mail list logo