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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:09:44+00:00 2026-06-10T15:09:44+00:00

I have a mysql table with around 20 columns, what I am trying to

  • 0

I have a mysql table with around 20 columns, what I am trying to do is retrieve values from database and send those values to a Web page.

So, by usingmysql_fetch_array() I can get the first value entered in the database and by using while(mysql_fetch_array()), I am able to retrieve all the values in the database table, and by using fwrite(), i can even send the values to a file.

But the problem is if i use while(mysql_fetch_array()), all the values are getting retrieved; I only want the current(latest) value entered in the database to be sent to another page. How do I do this?

  • 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-10T15:09:46+00:00Added an answer on June 10, 2026 at 3:09 pm

    Just filter your query to only get the desired result. So for example let’s say you have a timetamp filed in the database, do something like this:

    SELECT * FROM table ORDER BY `timestamp_field` DESC LIMIT 1
    

    Obviously you could use ASC instead of DESC if you wanted the earlier date. This same logic applies to other column types that you may want to sort as well.

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

Sidebar

Related Questions

I have a mysql user table that is around 35 columns wide, I notice
I have a users table in my mysql database with columns like id, age
I have around 30 columns in a MySQL table. I want to calculate how
I have a table in my Mysql database, which is used for authentication. And
I have a database with a table with 18 columns, the second of which
Im trying to get my head around MySQL. I have learnt a great deal
I have a table with around 6 million rows and has many columns with
I come from a MySQL background and am trying to wrap my head around
I have 3 columns in my MySQL table, 2 are INTs and one VARCHAR.
I'm messing around with PHP and a test MYSQL database. I've created a table

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.