Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Simple question on arrays and sql
March 31, 2008, 3:22 pm
rate this thread
entire array at once?
For example if I retrieve a set of data from one table in the database
with keys A, B and C, and suppose there are 100 records, and I build an
array $arr consisting of
$arr[$i]['A'], $arr[$i]['B'], and $arr[$i]['C']
where $i goes from 0 to 99,
is there a syntax to insert the entire $arr array at one time into
fields A, B, and C of a new table?
I really would like to avoid having 100 sql insert calls.
BTW, this is for an Oracle DB.
In the past I have only had to insert a few records at a time, so i
simply did multiple inserts. Of course for Oracle I could do the same
and only do a commit after all are done.
- » Is there a difference between Zend Extension and PHP Extensions
- — Next thread in » PHP Scripting Forum
- » Is Apache Needed w/IIS (Windows 2003) for PHP Install
- — Previous thread in » PHP Scripting Forum