Jump to content

select_into_from


Recommended Posts

please could not you help with syntax:

I try to use this:

<

SELECT *

INTO new_table_name

FROM old_tablename

<

found it there: http://www.w3schools.com/sql/sql_select_into.asp

but

_Query($sql,"SELECT * INTO new FROM old WHERE id = "&$value&";")

does not work

_Query($sql,"SELECT * INTO new FROM old")

does not work also

I use cdkid`s mysql.au3. Other functions used - SELECT FROM, INSERT TO, UPDATE work.

What`s wrong?

Link to comment
Share on other sites

SELECT INTO FROM does not work with mysql: http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

this function works instead:

_Query($sql,"INSERT INTO table2 (field1, field2) SELECT * FROM table1 WHERE id = "&$value&";")

The Forum is OK, but I`m very sorry if sent this message into wrong thread

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...