Results 1 to 4 of 4

Thread: Query-ing multiple tables.

  1. #1
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Query-ing multiple tables.

    Hello everyone.

    I have a database, which contains two tables:
    Members:
    ID; Firstname; Lastname; Log-in; Password; Base.
    Mining:
    ID; Type; Level; Coordinates.

    Now would I like to get a query that does the following:
    A: Look what player is accessing the page to determine his base coords (the player is logg-ed in to the site, so he has a valid session going);
    B: Extract the required data (the player can set the criteria trough a form!)
    C: Post the extracted data onto the site.

    The site it's about:
    http://swr.infiniteserve.com/swr2/mi...ost_mining.php

    Could someone please advise?
    Thanks!

    Christiaan

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    your link is broken.
    what do you mean by "post the data"? do you mean display it, or is there actually another page/site that you need to post to?

  3. #3
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Somehow the link gets altered when it's posted...
    Please look here:

    http://swr.infiniteserve.com
    /swr2/mining/post_mining.php

    Sorry about that Adrian.

    What I'm after is this:
    The player can select search criteria in the right-hand form on that site. The query then should:
    A. Look up the user's base coordinates (which are stored in the table 'members');
    B. Find the right type (oil/ metal/ energy or zynthium) mine (which are stored in the table 'mining'.
    C. Use the players criteria to display the type of mines/ level/ within that distance of his base.

    Does that make more sense to you? The result IS displayed on the same page.

    Thanks for advising/ helping.
    Christiaan

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    post links like this:
    [ url=http: //swr.infiniteserve.com/swr2/mining/post_mining.php ]my link[ /url ]
    if you simply use
    [ url ] http: //swr.infiniteserve.com/swr2/mining/post_mining.php [ /url ]
    the text between the tags will get truncated, AFAIK the value inside the tag will not.

    Edit: However, I don't get a response from the link you posted. I can get the main page ( infiniteserve.com ), but not any page from swr.infiniteserver.com, and infiniteserve.com/swr2/mining/post_mining.php just sends me back to the main page.


    --------------------------------------

    As for your questions,

    1. It sounds like your database already exists. if so, please post the structure of the relevant tables, and give an example of how the data is saved.
    2. how do we "find" the right types of mines? how do we determine which mines are "closest"? do you already have this logic worked out in your script?
    3. how do you want to display your results?

Bookmarks

Posting Permissions

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