Then you need to be even more explicit

INSERT INTO nye_opskrifter (foo,bar) SELECT foo, bar FROM opskrifter where
id
in($numbers)


> -----Original Message-----
> From: Lars Rasmussen [mailto:[EMAIL PROTECTED]
> Sent: 13 August 2003 19:22
> To: 'Jay Blanchard'; [EMAIL PROTECTED]
> Subject: INSERT .... SELECT
>
>
> I tried that, but i dont work either.
>
> I need to insert a way that mysql doese'nt complain when i copy some
> records that have the same id (or that it just gives it an id
> according
> to the AUTO_INCREMENT)
>
> Thanks again
>
> //Lars Rasmussen
>
> -----Oprindelig meddelelse-----
> Fra: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sendt: 13. august 2003 19:59
> Til: Lars Rasmussen; [EMAIL PROTECTED]
> Emne: RE: INSERT .... SELECT
>
>
> [snip]
> I used this command:
> INSERT INTO nye_opskrifter SELECT * FROM opskrifter where id
> in($numbers)
>
> But now it gives this error:
> Column count doesn't match value count at row 1
> [/snip]
>
> * does not return a specific number of columns, the work around is to
> specify the columns explicitly
>
> INSERT INTO nye_opskrifter SELECT foo, bar FROM opskrifter where id
> in($numbers)
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to