Re: [PHP] what is better way to write the query

2007-11-05 Thread Shafiq Rehman
Hi, If possible, write your inserts queries in a text file and use LOAD DATA for bulk inserts. -- Keep Smiling Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 11/2/07, Andrew Ballard <[EMAIL PROTECTED]> wrote: > > On Nov 2, 2007 10:41 AM, afan pasalic <[

Re: [PHP] what is better way to write the query

2007-11-02 Thread Andrew Ballard
On Nov 2, 2007 10:41 AM, afan pasalic <[EMAIL PROTECTED]> wrote: > ...is there any suggestion for the process of inserting up to 5K records at > the time ... Is it possible to save your data to a text file and then use one of MySQL's built-in import queries? (I know in some situations it isn't an

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
Stut wrote: > Jim Lucas wrote: >> afan pasalic wrote: >>> hi, >>> it's maybe more question for mysql list, but since php is involved >>> too... :-) >>> I have php script that inserts into mysql table couple hundreds of >>> records. >>> usually, it looks like: >>> >> // 1st record >>> $query = "INSE

Re: [PHP] what is better way to write the query

2007-11-02 Thread Stut
afan pasalic wrote: Stut wrote: afan pasalic wrote: Stut wrote: Jim Lucas wrote: afan pasalic wrote: hi, it's maybe more question for mysql list, but since php is involved too... :-) I have php script that inserts into mysql table couple hundreds of records. usually, it looks like: I would

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
Stut wrote: > afan pasalic wrote: >> Stut wrote: >>> Jim Lucas wrote: afan pasalic wrote: > hi, > it's maybe more question for mysql list, but since php is involved > too... :-) > I have php script that inserts into mysql table couple hundreds of > records. > usually, i

Re: [PHP] what is better way to write the query

2007-11-02 Thread Stut
afan pasalic wrote: Stut wrote: Jim Lucas wrote: afan pasalic wrote: hi, it's maybe more question for mysql list, but since php is involved too... :-) I have php script that inserts into mysql table couple hundreds of records. usually, it looks like: I would perform multiple inserts @ a time.

Re: [PHP] what is better way to write the query

2007-11-02 Thread Stut
Jim Lucas wrote: afan pasalic wrote: hi, it's maybe more question for mysql list, but since php is involved too... :-) I have php script that inserts into mysql table couple hundreds of records. usually, it looks like: I would perform multiple inserts @ a time. This way you save yourself s

Re: [PHP] what is better way to write the query

2007-11-02 Thread Jim Lucas
afan pasalic wrote: hi, it's maybe more question for mysql list, but since php is involved too... :-) I have php script that inserts into mysql table couple hundreds of records. usually, it looks like: I would perform multiple inserts @ a time. This way you save yourself some time by not havin

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
let me write the questions again: what is the difference between these two queries? is there any situation when it's better to use first vs. second solution? is there any suggestion for the process of inserting up to 5K records at the time or this number is so small to consider any "optimization"?