I'm trying to tweak some PHP code on my own without the programmer's help... actually it's just an addition that I want.
Basically, I'm trying to enter object_id... into a classes_entered table which has class_id & object_id.
There is also a classes table with class_id and show_id.
I'm trying to insert object_id into one show at a time, by show_id.
So I need a way to enter object_id into the classes entered table but only where the class id is associated with the show_id that is entered into the form.
User can enter the object_id and show_id...
Could someone help me? I feel like this should be easy, but uh... yeah, nope.
$object_id = $_POST;
$show_id = $_POST;
INSERT INTO classes_entered (class_id, object_id) SELECT class_id FROM shows, WHERE show_id=$show_id")or die("Could not enter show" . mysql_error());
I realize this is most likely horribly wrong. Obviously it doesn't work or I wouldn't be here. But that is what I have so far.