Jump to content

mkybell

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mkybell's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ...the IDs are the same? don't know what you're getting at but like I said it works
  2. thanks for the tip I got it working with the following not as neat as it probably could be but it's fine for me var j = 0; for (i=0;i<15;i++) { var ar = j/3; if (document.forms[0].elements[j].checked==false && document.forms[0].elements[j+1].checked==false && document.forms[0].elements[j+2].checked==false) { alert(msg[ar]+" is required."); return false } j+=3; } return true
  3. been struggling with this and can't figure it out trying to validate a form with radio buttons there are 15 elements with 3 radio buttons each (name and id are the same) if there are any fields where no choice has been made I want an alert message from what I've read in tutorials you can reference radio buttons with the same name like an array, with brackets I either get an error saying ....has no properties or the whole thing is undefined the only way I get this to work is by using the actual radio button name but I'd like to streamline this with variables and a loop any help is much appreciated, thanks in advance for (i=0;i<15;i++) { var temp = document.getElementById(fields[i]) if (temp[0].checked==false && temp[1].checked==false && temp[2].checked==false) { alert(msg[i]+" is required"); return false } } return true
  4. bwochinski, that variation on the LEFT JOIN worked perfectly thanks a lot btherl, the subquery that you listed does work. for some reason the whole query still returns all item records. I don't know ??? I've read that you can use subqueries to do what you can do with a LEFT JOIN so it must be possible.
  5. no, after a particular reviewer logs in I want to list all items that haven't yet been reviewed by that person an item they haven't reviewed might have already been reviewed by someone else
  6. I tried your suggestion with review.reviewerID IS NULL and it only returns one record. With the data I'm testing with I should be getting 3. Unless you can be more specific I don't know how else to apply IS NULL.
  7. that makes sense but returned all records this is the closest thing that works SELECT * FROM items LEFT JOIN reviews ON items.itemID=reviews.itemID WHERE review.reviewerID != $reviewer this way almost works but I also get items that have been reviewed but by someone else, so they still exist in the review table if I just change the !=, on the last line, to = then I get items that have already been reviewed by that reviewer. all I need here is to get every other item record but can't figure it out
  8. ok, this is probably pretty simple. I've spent hours and can't get this. I have two tables, one has items being reviewed and the other has the results of the review forms. They're tied together with item IDs used in both. The review table also lists the reviewer. So, basically the item table will list an item with a unique item ID and other fields with item information. A review table record will have the unique item ID, a unique ID for the reviewer, and all the rest of the review info. This table holds all item reviews posted from various reviewers. When a reviewer is logged in I need them to see a list of items that they haven't yet reviewed. I was very close to getting this using JOIN. I got all items that a particular reviewer hadn't reviewed but also got items that they had if there was a record in the database from someone else having reviewed it. Would someone please help me with this? Figure I have a table called 'items' and one called 'reviews'. Both tables have fields labeled 'itemID' and the 'reviews' table has a field called 'reviewerID'. Thanks in advance.
×
×
  • 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.