>Does MySQL support parameterized queries (e.g., "INSERT INTO table
>(Col1,Col2) VALUES (?,?)"), and if so, is there a PHP function that allows
>you to create and attach parameters to MySQL queries?

I don't believe MySQL supports that, so there's no PHP mechanism for it.

However, you *can* insert a bunch of rows at once with something like:

$query = "insert into table (col1, col2) values (1, 2), (3, 4), (5, 6)";

I don't guarantee I got the MySQL syntax correct, though.

This is, however, not supported under other database engines, so be aware
that you'll need to alter it if you ever move to something other than MySQL.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to