Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2015
    Posts
    4

    Unanswered: fetch data from mysql

    How to fetch data from mysql in php as per new product added so that the product displayed one after another on the same area buy keep updated according to the time?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    How to fetch data from MySQL?
    ...use a query
    how to use a mySQL in PHP?
    ..use the correct PHP MySQL object library. mysqli or PDO
    how to 'product displayed one after antoher?
    ..set an ORDER BY clause in your query
    how to 'keep updated by time'?
    ...not certain Im sure of what you mean. If its get new data as its added to the db
    ..then refresh your PHP page (or use an AJAX script to refresh the data at the required interval), but bear in mind that refreshing the data comes at a cost in terms of server and network resources. its a trade off between how often the data changes and how much spare capacity you have in your setup. its one of the inherent issues with web pages that essentially they are static until such time as you refresh them. you cna get round that to a certain extent by using, say a JAVASCRIPT / AJAX call at a presscribed interval to get the most recent data.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •