Jump to content

Vitamin

Members
  • Posts

    88
  • Joined

  • Last visited

    Never

Everything posted by Vitamin

  1. Ah, ok I just need to think before I go typing all that out, I got it. Just have to make sure the div that I want to show is not enclosed in the click able div!
  2. I have a div that when clicked will slide down. Once it is expanded there are a couple comboboxs that can be chosen. I run into a problem tho, I want the user to be able to slide the div back up when they are done choosing their values in the combo box, but once you click anywhere in the div (including the combo box) the div slides back to the default place. What is the best way to approach this so that values can be chosen from the combo boxes without it sliding back up? Ill post the jQuery script that controls the 2 div's. $('div#runes').click(function () { if ($('#showrunes').is(':hidden')) { $('div#showrunes').slideDown('slow'); } else { $('div#showrunes').slideUp(); } });
  3. what scroll bar are you talking about. The scroll bar in the browser?
  4. I don't believe this can be done because it would cause a endless loop.
  5. Hey thanks for the info. I'll dentally keep that in mind if I ever make a attempt at triggers again.
  6. Server version is 5.5.15. I run it on windows (not sure if that matters). According to the documentation I found what I was doing wrong though. Which was exactly what I was doing. I might mess around with it more some other time, but my new solution works perfectly. Originally I was using the BEFORE, but when I copy pasted my code I was trying the AFTER trigger. Thanks for the help!
  7. Thanks for the help guys. I guess my problem was using the AFTER INSERT instead of BEFORE INSERT. Can't use keyword NEW in a AFTER INSERT trigger. It works now, but I went another way about it in my code rather then using a trigger.
  8. I have a multiple table database. I need to have 1 table that keeps track of 4 of the child tables. The structure of the 4 child tables is as follows. table1-4 id = auto_increment masterid = (Needs to be the ID of the master table) more fields... The master table is id = auto_increment tablesid = The id of the table depending on which table gets a insert. The trigger is this DELIMITER $$ CREATE TRIGGER ins_masterid AFTER INSERT ON `table1` FOR EACH ROW BEGIN INSERT INTO mastertable (id, table1id) VALUES (NULL, NEW.id); SET NEW.table1id = LAST_INSERT_ID(); END$$ DELIMITER ; The trigger is created and runs with INSERTS, but the table1id is not inserted into the mastertable. On every insert the value is 0. Apparently NEW.id in the INSERT INTO line is not the right thing to use. This is my first go at triggers, so any help would be greatly appreciated.
×
×
  • 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.