Re: [PHP] copying tables

2002-11-20 Thread Chris Shiflett
--- Steve Buehler <[EMAIL PROTECTED]> wrote: > What I am trying to do is to copy a mysql table to a new table name > in a PHP script. An SQL statement similar to this might be what you are looking for: create table tmp_foo as select * from foo I believe this will fail to create any keys, indece

Re: [PHP] Questions regarding inserting and updating data into aMySQL db

2002-09-10 Thread Chris Shiflett
You should search for some SQL tutorials on the Web. What it sounds like you are looking for is the "update" SQL statement which modifies an existing row (for your second form, for example). Thus, you "insert" the row to create it (which assigns the key using the auto increment), then "update"