www.webdeveloper.com
Results 1 to 3 of 3

Thread: Displaying retrieved MySQL data in nice looking rows

  1. #1
    Join Date
    Aug 2009
    Posts
    45

    Displaying retrieved MySQL data in nice looking rows

    Hi, i'm just looking for some advice in relation to retrieving data from a MySQL database and displaying in nice looking rows. Basically, what i want to do is call the data into separate rows similar to what is on here. I'm not sure if these are separate divs or rows but it looks pretty cool. I've been searching the net for instructions on displaying MySQL data on a webpage but haven't found a whole lot. I'm just wondering if anyone know how this is done. I know how to call the data but it's just displaying the data is causing the issue. If anyone can point me in the right direction i would really appreciate it.

    Thank you

  2. #2
    Join Date
    Oct 2005
    Posts
    843
    Quote Originally Posted by thegreatdanton View Post
    Hi, i'm just looking for some advice in relation to retrieving data from a MySQL database and displaying in nice looking rows. Basically, what i want to do is call the data into separate rows similar to what is on here. I'm not sure if these are separate divs or rows but it looks pretty cool. I've been searching the net for instructions on displaying MySQL data on a webpage but haven't found a whole lot. I'm just wondering if anyone know how this is done. I know how to call the data but it's just displaying the data is causing the issue. If anyone can point me in the right direction i would really appreciate it.

    Thank you
    Basically you would have your query to pull the info from the database then to display it all it would be like:
    PHP Code:
    $query "random query here";
    $result mysql_query($query) or die(mysql_error());

    while(
    $row mysql_fetch_array($result)){
       echo 
    $row['columnName'] . "<br>";
       echo 
    $row['columnName'] . "<br>";

    Then inside the while loop you would have your format for how the data is to be displayed so you can use div's or table's or such to format it appropriately. This will run through every row that was pulled according to the query, then the $row['columnName'] will be the data for what was in that column for that row its currently on.

    A nice read i found was:
    http://www.tizag.com/mysqlTutorial/
    Welsh

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,145
    Quote Originally Posted by thegreatdanton View Post
    ... I'm not sure if these are separate divs or rows but it looks pretty cool....
    Just bring up the page in your browser and do a View -> Page Source (or whatever your browser calls it), and you can see how that page was laid out and formatted. (The "Web Developer" extension for Firefox can make it easy to see the CSS, too.)
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles