Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 2 of 2

Thread: PHP/MySQL assoc array, pulling data

  1. #1

    PHP/MySQL assoc array, pulling data

    Hey guys,
    more php/mysql help

    Normally how I pull data from a single table is by querying the database by pulling all the data from a table where there's a specific ID or something, so it just seperates out what I need.

    However, this time I'm working with a table that it's impossible to pull data out that way. So if I did it the way I described above I'd have to make about 200 connections to the database, one for each row I'd change. So what I want to know is if there's a way to pull data from a table by fetching the associative array of all data under a table, and calling the data by identifying two columns of information to get the row I want.

    So that probably didn't make sense.

    Right now I pull data like this $myarray['column']

    But what I want to do is $myarray['column'] WHERE column1 = blah & column2 = blahagain.

    So does that all have to be done before querying the database, or is there a way to do it like I'm saying.

    Sorry that this is all over the place and confusing.

  2. #2
    I am not sure of what you mean (To tired here)... but might it be that you are looking for something like this:

    "SELECT * FROM blabla WHERE column1='blah' AND column2='blahagain'"

    // Paul

    -- Bed time now.. time: 1.40 =S

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012