Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7891969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:45:07+00:00 2026-06-03T06:45:07+00:00

Me back again whit a PHP mySQLi pagination problem… When I rune the script

  • 0

Me back again whit a PHP mySQLi pagination problem…
When I rune the script it works fine for first page, but when y click on the link to the second pages te links works but the pagination disappears. so if I have 3 links now I see none.
Here’s my code.

<?php

    include_once ('myConnection.php');

    if ( isset( $_GET["get_name"] ) ) { 
        $las_escuelas = $_GET["get_name"];
    } else { 
        $las_escuelas = 1; 
    };

    $start_from = ( $las_escuelas - 1 ) * 10;

    $escuelas = "SELECT * 
                   FROM escuelas 
                   WHERE delegacion = '$delegacion' 
                     AND nivel = '$nivel' 
                   ORDER BY nombre ASC 
                   LIMIT $start_from, 10";

    $consulta = mysqli_query( $miguia, $escuelas ) or die ( mysqli_error() );

    while ( $fila = mysqli_fetch_array( $consulta ) ) {
        echo $fila['name'] . '<br>' . $fila['street'] . ' ' . $fila['numero'] . ' ' . $fila['place'] . ' ' . $fila['phone'] . '<br>';
    };

    $escuelas = "SELECT COUNT(delegacion) 
                   FROM escuelas 
                   WHERE delegacion = '$delegacion' 
                     AND nivel = '$nivel'";

    $consulta = mysqli_query( $miguia, $escuelas );
    $fila = mysqli_fetch_row( $consulta );
    $registros_total = $fila[0];
    $paginas_total = ceil( $registros_total / 10 );

    for ( $i = 1; $i <= $paginas_total; $i++ ) {
        echo "<a href='resultados1.php?las_escuelas=".$i."'>".$i."</a> ";
    };

?>

Thank’s 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:45:08+00:00Added an answer on June 3, 2026 at 6:45 am

    I think (it’s pretty hard to “reverse engineer Spanish code 🙂 that you should start your for cycle from $i = 0 instead of 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to convert an int to a byte[] and back again, but
I am trying to change screens from the first to second and back again,
Possible Duplicate: Split A4 PDF page into two A5 and back again I have
I know how to make all these uiimageviews disappear and come back again, but
I'm back again with probably what is a small problem that I can't seem
Back again with a javascript question within sharepoint. I would like to hide a
back again with some more SQLAlchemy shenanigans. Let me step through this. My table
How can I convert a List<MyObject> to an IEnumerable<MyObject> and then back again? I
Back in the old days, Help was not trivial but possible: generate some funky
Back in the 90s when I first started out with MFC I used to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.