Adding data into table from another table, PHP?

pandemonium7386

New member
Hey guys, I'm having trouble adding some data from another table. I have a "sectorTbl" and I tried adding this to the "mainTbl"

$query = "INSERT INTO masterTbl VALUES ('','','select siteNum from sectorTbl where secSiteID = "1" and where sector = "1")";

I get an error saying "PHP Parse error: syntax error, unexpected T_LNUMBER in /var/www/html/php/inputMasterTbl.php on line 7"

Someone help please! Thanks!
 
Back
Top