sequentially select records

sequentially select records

am 06.05.2005 09:21:14 von Zibi

I want to select one record from some table and then insert or update to
another table. The next SQL are depending on the values of SQL_1.
Database - mysql

For example:


For i = 0 To number

SQL_1 = SELECT product FROM database WHERE category = 1

my_Conn.Execute SQL_1

SQL_2 = INSERT INTO table1

my_Conn.Execute SQL_2

SQL_3 = "INSERT INTO table2

my_Conn.Execute SQL_3

SQL_4 = "UPDATE table3

my_Conn.Execute SQL_4

Next

Re: sequentially select records

am 06.05.2005 09:34:08 von Zibi

The first SQL is
INSERT INTO Table (col1, col2) SELECT col1, col2 FROM Table WHERE ...
category = 1