Jump to content

o3d

Members
  • Posts

    138
  • Joined

  • Last visited

    Never

About o3d

  • Birthday 03/30/1981

Profile Information

  • Gender
    Male
  • Location
    South-Africa

o3d's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm not sure if this will work, but have a look at the query below, I added the "AND items..." section: SELECT * FROM items LEFT JOIN user_items ON items.item_id=user_items.item_id WHERE user_items.userid='$userid' AND items.item_id NOT IN ( SELECT primary_id FROM user_equipped_items WHERE userid='$userid' ) This will exclude all item_id's that is found in the user_equipped_items table. I'm also not sure if primary_id is the correct column? To come back to your original question on how to join, it gets complicated when you left join and then want to join another table to that table. Let me know if the above sql works, if not I'll rethink the query.
  2. Maybe try this: select * from dp, perso, center where dp.pid = perso.pid and center.pid = dp.pid order by dp.id asc Just remember that the same pid row data need to exist in all 3 tables else it won't work. Ps. try to use the sql keywords JOIN, etc when querying from multiple tables. It will save you a lot of debugging when you start working on larger queries: eg. select * from dp join perso on perso.pid = dp.pid join center on center.pid = dp.pid order by dp.id asc
  3. A very rough approach could be to put each <div class="data"> section into an array and then go through that array and find ITEMID. <?PHP $page_content_array = explode('<div class="data">', $page_contents); for ($i=0; $i<count($page_content_array); $i++) { $content_array = explode('/', $page_content_array[$i]); $content_array[5]; //this should contain the ITEMID for every <div class="data"> section } ?> this has not been tested
×
×
  • 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.