SELETC...INSERT plus a String

Codes here !

Moderators: macek, egami, gesf

Post Reply
NigelRen
php-forum Fan User
php-forum Fan User
Posts: 597
Joined: Fri Aug 05, 2011 9:53 am

Re: SELETC...INSERT plus a String

Post by NigelRen » Fri Aug 17, 2012 11:28 pm

Sounds like you want to use an insert ... select type statement - http://dev.mysql.com/doc/refman/5.1/en/ ... elect.html.

You should be able to work out from their example of

Code: Select all

INSERT INTO tbl_temp2 (fld_id)
  SELECT tbl_temp1.fld_order_id
  FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;
what this should be as you already have most of it.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests