id; } } else { mysql_query("REPLACE INTO cells (n1, n2, lac, cid) VALUES ($_GET[n1], $_GET[n2], $_GET[l], $_GET[c])"); $id = mysql_insert_id(); } mysql_query("INSERT INTO cell_comments (cell_id, comment) VALUES($id, '$_GET[com]')"); print $id; } else { $results = mysql_query("SELECT * FROM cells JOIN cell_comments on cells.id = cell_comments.cell_id"); while ($res = mysql_fetch_object($results)) { print "Net 1: $res->n1, Net 2: $res->n2, LAC: $res->lac, CID: $res->cid, Comment: $res->comment
"; } } ?>