Hi!
i try one little question.
when the table2 have one more row then table1.. is possible try something
like this:
insert into table2 ($date, select * from table1 where username = '$uname')
where $date -> system time and date generated from php.
If you understand.. table2 is backup of table1 when is something (row)
changed...
so I would like copy the row from table2 to table2 but try to add a field
named "time" or "date".
Is possible copy it and add in new table a new field?
> On Mon, Mar 19, 2001 at 12:22:09PM +0100, - = k o l i s k o = - wrote:
> > Hi!
> >
> > I have a problem. I would like copy one row from table1 to
> > another table2. How could I do?
> >
> > I tried something like this:
> >
> > insert into table2 values (select * from table1 where username =
'$uname')
> >
> > both (table1 and table2) have the same structure.
> > Every time when I try do this sql command i get syntax error in sql
command.
>
> Is there really an SQL server that would accept this query? Try just:
>
> insert into table2 select * from table1 where username = '$uname';
>
> G'luck,
> Peter
>
> --
> because I didn't think of a good beginning of it.
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php