Jump to content

Need Help


jana

Recommended Posts

the MySQL manual wants to be your friend, you know:

[url=http://dev.mysql.com/doc/refman/5.0/en/insert-select.html]INSERT ... SELECT syntax[/url]

looks like you'd want something like:

[code]INSERT INTO test1 (e_id, e_name)
  SELECT test2.e_id, test2.e_name
  FROM test2 WHERE test2.e_id > 3[/code]

can't guarantee the two-column SELECT will work, but it's worth a shot.  it should probably work as long as you specify the column order in the INSERT INTO portion.
Link to comment
https://forums.phpfreaks.com/topic/24175-need-help/#findComment-109883
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.