Jump to content

Jimbo

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jimbo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Eek, you wouldn't think I was a native English speaker would you? Not a query, no, I want to know if there's a php function to look at a result resource from a multi-record SELECT * query and give you the array row that corresponds to the db record with the primary key you want to look up. All I know is that I can mysql_fetch_array records sequentially from wherever the array pointer is currently at, or I can use mysql_data_seek to get a particular row by it's row_id. Edit: And, yes, I know I said "I just want to query" in my previous post....sorry, didn't mean as in query db! Urk.
  2. Thanks for the reply. I guess I did waffle a bit, as this isn't what I'm asking. I'm trying to avoid having that second query, the one you've just written, when I've already got an array (well, the 'resource') with all the records I want in it. I just want to be able to query that same resource by the selected 'id'. I want to pull out a specific row. If it's not possible, then sure, I'll run the query that looks up the 'id'. mysql_data_seek()? Although that looks up a row number, doesn't it? Hehe, it's a simple concept that I'm managing to explain really badly! Sorry. Edit: I should add that I'm sticking the result of the query, in $_SESSION, hence not wanting to bother with another query on the details page.
  3. Hi, I'm selecting a group of records from a table, then, using mysql_fetch_array() and successfully creating a table of results. All fine and no problem. A row in this table is a small portion of the fields from the database record, with the whole record to be displayed on an item details page via a link. My question is: When the user clicks a link to a particular item, which will be identified by the unique id from the record, how do I query the result resource that I already have from the select query to feed that, specifc, record to the details page? I don't want to have to re-query the database using the unique ID if I don't have to. I understand that mysql_fetch_array just advances the array pointer along one. What am I missing? Any advice gratefully lapped up! Cheers.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.