Hi there...
Is it possible to write an UPDATE or INSERT query, where the new value comes
from an array? For example:
UPDATE table_a SET column_x = [@array1]
WHERE column_y = [@array2];
It's a query (for argument's sake called query1) in an Access database,
which I'm accessing as a stored procedure through PHP, so I would run some
php code that looked possibly like this:
$array1 = array("a","b"," c","d");
$array2 = array(1,2,3,4);
$str_sql = "exec query1 $array1, $array2";
my_run_query_fu nction($str_sql );
But is it possible? The information I can find about it seems to say that it
has to be an array created inside the query, but if it's a stored procedure,
this isn't possible, is it?
Hope someone can help...
Plankmeister.
Is it possible to write an UPDATE or INSERT query, where the new value comes
from an array? For example:
UPDATE table_a SET column_x = [@array1]
WHERE column_y = [@array2];
It's a query (for argument's sake called query1) in an Access database,
which I'm accessing as a stored procedure through PHP, so I would run some
php code that looked possibly like this:
$array1 = array("a","b"," c","d");
$array2 = array(1,2,3,4);
$str_sql = "exec query1 $array1, $array2";
my_run_query_fu nction($str_sql );
But is it possible? The information I can find about it seems to say that it
has to be an array created inside the query, but if it's a stored procedure,
this isn't possible, is it?
Hope someone can help...
Plankmeister.
Comment