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 6795415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:20:33+00:00 2026-05-26T18:20:33+00:00

Hello and good day to all. I have the following code to retrieve from

  • 0

Hello and good day to all.
I have the following code to retrieve from MYSQL:

mysql_select_db($database_webiceberg, $webiceberg);
$query_services = "SELECT
services.id_services,
services.title,
services.body,
services.link,
services.cattegory,
services.service_cattegory,
services.page_title,
services.lang
from services
where lang=2 and 
cattegory='$webdesign'" ;
$services = mysql_query($query_services, $webiceberg) or die(mysql_error());
$row_services = mysql_fetch_assoc($services);
$totalRows_services =  mysql_num_rows($services);

In the HTML I have this :

  <?php do { ?>
                  <!-- Content: Blog Page -->
                  <a name="blog_page" id="blog_page"></a>
                  <div class="ribbon">
                    <div class="wrapAround"></div>
                    <div class="tab">
                     <span name="<?php echo $row_services['title']; ?>">
                    <?php echo $row_services['title']; ?><a href='#Wrapper'>Top</a></span> 
                    </div>
                  </div>
                 <?php 

                 echo $row_services['body']; ?>
                  <p><br />


                    <a name="multi_column_page"></a>
                  </p>
                    <?php } while ($row_services = mysql_fetch_assoc($services)); ?>

Iam trying to add this line of code only to the final reccord in the query <a href='#Wrapper'>Top</a>
Anybody has ideas how i could do that without adding additional queries ?

  • 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-05-26T18:20:33+00:00Added an answer on May 26, 2026 at 6:20 pm

    in the first set of code, rename $row_services to $next_row

    then just after do {, put this:

    $row_services=$next_row;
    $next_row=mysql_fetch_assoc($services);
    

    then you can tell if the current $row_services is the last, because $next_row will be false.

    replace the while line with this:

    <?php } while ($next_row); ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello and good day to you. Following code fragment compiles on cl.exe (15.00.30729.01) and
Hello and good day to you. Situation: For some reason, from time to time
I have a string: hello good old world and i want to upper case
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello again ladies and gents! OK, following on from my other question on ASP.NET
I want to represent the list hi, hello, goodbye, good day, howdy (with that
Why hello there Stackoverflow, I have a nutcracker for ya, is there an good
Hello I need to retrieve data from database via an ajax call. I am
Hello and good day to you. Is this true (is it required by standard)
Hello good Stack Overflow people, I do have a business problem and would like

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.