Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Retrieving MySQL data into nice rows

  • 31-08-2009 6:15pm
    #1
    Closed Accounts Posts: 29


    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
    Tagged:


Comments

  • Closed Accounts Posts: 681 ✭✭✭Kopf


    You need a dynamic language to interface with the database and present the information - I'd reccomend J or Prolog as probably the languages with greatest support for this.


  • Closed Accounts Posts: 207 ✭✭johnl


    I'd probably recommend J over Prolog, your codebase will be a lot smaller, and if you need to implement Mandelbrotian caching at a later stage, it's just a few extra characters!

    Here's a rather useful article on getting started with J and SQL:

    http://www.jsoftware.com/jwiki/Addons/data/sqlite


  • Closed Accounts Posts: 8 Hardy Heron


    I recommend using Qt. (no not QuickTime lol) It's crossplatform and very good for making guis. :)


  • Closed Accounts Posts: 333 ✭✭McGintyMcGoo


    Unless I'm completely missing the point here, the OP wants to know how to display data retrieved from a MySQL database on a webpage. He already knows how to get the data so the display should all be done with CSS and HTML. :confused:


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    Have to agree with McGinty - that's my read on it too. Time to hit http://www.w3schools.com/css/ for tips on displaying text on a webpage I think :)


  • Advertisement
  • Closed Accounts Posts: 29 eagleeyejoe


    That's it Ron and McGinty. I know how to call the data onto the page but what i'm looking for really are some php examples of data being called into a nice looking div such as the example i gave at the outset. I guess i'll have to mess around with it. I though there would have been a lot more example on the net in relation to displaying retrieved data on a webpage.


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    To be honest OP there probably won't be much up on the net about this at strictly speaking it's a design specific issue (that is to say it's different for each design/project). What you need to do is look at this in steps.
    1. What information am I looking to display to the screen?
    2. What HTML tags are needed to format the text?
    3. What styling is needed to get the formatting to match the design I'm looking to implement

    If we take the example of the rental page that you were linking us to to then we need to display:
    1. The address of the property
    2. A picture of the property
    3. The price of the property
    4. The number of rooms
    5. A description of the property
    6. When the posting was entered

    This is all information retrievable (presumedly) from a database. Next how will we format the data.
    1. The address as a header
    2. The picture in the left part of the division
    3. The price and all other information as the right hand side of the division

    This gives us a template of divisions as follows:
    <div class="resultHolder">
    <div class="header">Address goes here</div>
    <div class="lhs"><img src="" /></div>
    <div class="rhs">All other data goes here</div>
    </div>
    

    Finally we need to format the tags to display as we hope. For this you'd obviously need to apply the design you have in mind yourself. A rough outline of the design might look something like this:
    .resultHolder {
    width:90%;
    clear: both;
    border: 1px black solid;
    }
    
    .resultHolder .header {
    width:100%;
    clear:both;
    background-image:url();
    }
    
    .resultHolder .rhs {
    width:75%;
    float:right;
    }
    
    .resultHolder .lhs {
    width:25%;
    float:left;
    }
    

    This will need adapting to match your design (and tweaking to be cross-browser applicable) but might be a good start for your design. If you wish to more closely match the design you saw in the rental page you could view the source to see how they did it and create your own design from this (or contact the designers and ask if you can use their stylesheet).

    If you already know how to extract the data from the database and display to the screen you won't need any pointers on that but if you run into difficulties feel free to PM me.

    Regards,
    RD


  • Closed Accounts Posts: 29 eagleeyejoe


    Hi Ron,

    Thank you for a very detailed reply, you went to a lot of trouble in fairness. To be honest i haven't looked at it since i posted the question but i will be doing so in the next day or two. At least i know that it's more of a design issue rather than a php issue.

    I'll mess around with the output and may contact you if i have any issues.

    Thanks again for your help.

    eagleeyejoe


Advertisement