Hi, I want to populate two related tables : here is the code
include ("connect.php"); $req="select * from tab where num='$mod'"; $result=mysql_query($req,$db); if ($ligne=mysql_fetch_array($result)) //if the data is already there do nothing {continue;} //otherwise put it in table 1 $req2="INSERT INTO tab (num) VALUES ('$mod')"; $result2=mysql_query($req2,$db); //and then add the relational element to table 2 $req4="INSERT INTO inter (id_tab) SELECT id_tab FROM tab WHERE num='$mod'"; $result4=mysql_query($req4, $db); The first part works fine on both servers (table 1) Table 2 fills up fine on my machine but not on the server wher it is supposed to go ! Any idea ? Christine