Below is a few lines of php/mysql code that show where the problem seems to appear:
$create = mysql_query("CREATE TABLE $schoolname LIKE johns_hopkins_university"); $activated1 = mysql_query("UPDATE cumulative SET schoolname='$schoolname' WHERE id='$id'"); $activated2 = mysql_query("UPDATE applications SET role='Accept' WHERE id='$id'"); $captain = mysql_query(" INSERT INTO $schoolname SELECT *, 'Captain', 'Admin' FROM cumulative WHERE email='$email'") or die("Copy Query didn't work");
First, the creating of the new table ($schoolname) works. Next, denoting this activation on both the cumulative user table, and the applicant table, works great, but what doesn't work is that when I try to copy over information from cumulative to the new table, it won't do it. I have included the die function but that isn't triggered and the copy supposedly is being processed but there is no resulting row in the new table.
Is there perhaps a different way to create and add data to a new table other than what I have above? Is there a different underlying issue??
Thank you in advance for the help