Blue
White
Purple
Green
Red
Orange
Blue Light
White Light
Purple Light
Green Light
Red Light
Orange Light
Hi i use following$str ="SELECT * FROM 28";$rs = db_query($str,$conn);$data = db_fetch_array($rs);echo $data["month"];$strSQLInsert = "insert into restinghoursheetchild (date1,connect1) values ('".$data["month"]."','".$data["connect1"]."')";db_exec($strSQLInsert,$conn);but does not insert all records from table 28 but only one record can you help
You need a loop:
global $conn;$str ="SELECT month,connect1 FROM 28";$rs = db_query($str,$conn);while($data = db_fetch_array($rs)){ $strSQLInsert = "insert into restinghoursheetchild (date1,connect1) values ('".$data["month"]."','".$data["connect1"]."')"; db_exec($strSQLInsert,$conn);}
global $conn;$str ="SELECT month,connect1 FROM 28";$rs = db_query($str,$conn);while($data = db_fetch_array($rs)){$strSQLInsert = "insert into restinghoursheetchild (date1,connect1) values ('".$data["month"]."','".$data["connect1"]."')";db_exec($strSQLInsert,$conn);}
thanks you very much is working !!!!!!