>>> $result3=mssql_query($query3) or die ("The query has failed"); <snip> > http://dev.mysql.com/doc/refman/5.0/en/insert-select.html Ah - the OP isn't using mysql, it's ms-sql. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php