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

Contact Listings format

  • 23-01-2009 10:31am
    #1
    Closed Accounts Posts: 73 ✭✭


    Hi all

    This is my first time to try to do this. I have my database finished and ready.
    What i want to do is list name, surname, phone and address as one listing and then have another listing with more information like their business name or and mobile number etc.

    I need to have the full information listing come up first followed be the smaller listing.

    Please help


Comments

  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Protype wrote: »
    Hi all

    This is my first time to try to do this. I have my database finished and ready.
    What i want to do is list name, surname, phone and address as one listing and then have another listing with more information like their business name or and mobile number etc.

    I need to have the full information listing come up first followed be the smaller listing.

    Please help

    Need more info if we are to help! Is this a website project or application project?

    What type of setup are you planning on using? By this I mean languages and technologies you have available for this project


  • Closed Accounts Posts: 73 ✭✭Protype


    John_Mc wrote: »
    Need more info if we are to help! Is this a website project or application project?

    What type of setup are you planning on using? By this I mean languages and technologies you have available for this project

    Its for a directory search result page, so the user searches for a contact in a county and gets all contacts in that county where some contacts have more information than others. This is why i need 2 types of listings to show in one result page

    I am using:
    MySQL
    php


  • Closed Accounts Posts: 73 ✭✭Protype


    Ill try to ask the question in a better fashion.

    Should i create 1 results page?
    Do i have the 2 listing types in his page?
    Do i have 2 different listing files and the results page?


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    This is a web-app, right?

    What about a results page with the basic details and then a link with a pop-up or floating div that shows more details?


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    additionally, is it the layout that you're having a problem with, or the database query, or handling the retrieved data?


  • Advertisement
  • Closed Accounts Posts: 73 ✭✭Protype


    Mirror wrote: »
    additionally, is it the layout that you're having a problem with, or the database query, or handling the retrieved data?


    I would say layout or how to layout the page so that 2 different listings can show at the same time


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Protype wrote: »
    I would say layout or how to layout the page so that 2 different listings can show at the same time
    well I would think the simplest option would be two have to pages, the first displaying the list of contacts with their basic information, and a link for each to click through to a second page that displays the full details for the selected contact.


  • Closed Accounts Posts: 73 ✭✭Protype


    Lets say i have two different categories of listing that i would sort in the sql.
    so i need cat1 to come up at the top of the page and cat2 listings come up after all cat1 listings.

    Do i design a page with two listing or do i create a file with the code for each listing type.

    what i am doing is creating the page from a template, and then adding the cat types to the page is this the right thing to do?

    i am lost


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    i'm a bit lost as well :) why don't you post what you've got so far, or if you don't have much why don't you just do a short example layout of what you're trying to achieve with some static html and dummy text?


  • Closed Accounts Posts: 73 ✭✭Protype


    Mirror wrote: »
    i'm a bit lost as well :) why don't you post what you've got so far, or if you don't have much why don't you just do a short example layout of what you're trying to achieve with some static html and dummy text?

    LOL

    I have never put together a results page before, so i don't really know how it should be assembled.

    I have a two tables with a graphic in the background, i want these tables to display with the information retrieved from the MySQL database.
    So the problem is i have two tables which hold different amounts of information and i need to have both tables in one results page.


    Simple question is, How do i do this?:o

    P.S. Please don't forget the two tables have information about different people.


  • Advertisement
  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Protype wrote: »
    LOL

    I have never put together a results page before, so i don't really know how it should be assembled.

    I have a two tables with a graphic in the background, i want these tables to display with the information retrieved from the MySQL database.
    So the problem is i have two tables which hold different amounts of information and i need to have both tables in one results page.


    Simple question is, How do i do this?:o

    P.S. Please don't forget the two tables have information about different people.
    ok, i recommend you follow this tutorial first: http://www.w3schools.com/php/php_mysql_select.asp

    see how far you get based off that, and let me know if you get stuck!


  • Closed Accounts Posts: 73 ✭✭Protype


    Mirror wrote: »
    ok, i recommend you follow this tutorial first: http://www.w3schools.com/php/php_mysql_select.asp

    see how far you get based off that, and let me know if you get stuck!

    <?php // this is what i was not doing. DOW
    $con = mysql_connect("localhost","peter","abc123");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    mysql_select_db("my_db", $con);

    $result = mysql_query("SELECT * FROM Persons");

    echo "<table border='1'>
    <
    tr>
    <th>Firstname</th>
    <th>Lastname</th>
    </tr>";
    while($row = mysql_fetch_array($result))
    {
    echo "<tr>";
    echo "<td>" . $row . "</td>";
    echo "<td>" . $row . "</td>";
    echo "</tr>";
    }
    echo "</table>";
    mysql_close($con);
    ?> // Putting the table inside the php tags:D:D:D


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    :D

    a valuable lesson has been learned here today! 90% of unexpected errors are caused by something INCREDIBLY simple we've overlooked! everyone suffers this from time to time, regardless of how much experience we've got ;)


Advertisement