[PHP-DB] Access & MS SQL idnetical thru ODBC ??

2001-01-21 Thread Sigurd Magnusson
I have written a small program which uses ODBC to connect to a Access Database. I am simply wanting to know if this would also work with MS SQL without any modifications what so ever, or does ODBC not really accomplish what it was designed for ? The SQL statments used are very simple; the INSER

[PHP-DB] Near-duplicate a row ?

2001-01-22 Thread Sigurd Magnusson
Whats the easiest way to duplicate a row, specifiying only a new primary number? Is the easiest way: 1. "SELECT * where primarykey=oldnum" 2. roll through the fields, getting current fields and values 3. "INSERT where primarykey=newnum" ... etc? Or is there an SQL statement to achieve this ?