Re: [PHP] Compare and inserting with php

2009-06-30 Thread Miller, Terion
On 6/30/09 1:31 PM, "Tom Worster" wrote: On 6/30/09 11:17 AM, "Ashley Sheridan" wrote: > It's a bad way of doing it, but could you not create a unique index on the > particular key you want to be unique, and then just try the select anyway > with the mysql_query() call preceeded with an @ to

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Tom Worster
On 6/30/09 11:17 AM, "Ashley Sheridan" wrote: > It's a bad way of doing it, but could you not create a unique index on the > particular key you want to be unique, and then just try the select anyway > with the mysql_query() call preceeded with an @ to suppress warnings? if you're going that rout

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Andrew Ballard
On Tue, Jun 30, 2009 at 2:19 PM, Miller, Terion wrote: > > > > >>> >> >> Does this list of inspections exist in the db? Could you not use an >> INSERT INTO SELECT * FROM TABLE WHERE type statement...much less >> processing overhead then >> >> -- >> >> Bastien >> >> Cat, the other other white meat >

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Miller, Terion
>> > > Does this list of inspections exist in the db? Could you not use an > INSERT INTO SELECT * FROM TABLE WHERE type statement...much less > processing overhead then > > -- > > Bastien > > Cat, the other other white meat > > Hi Bastien, > > Something like this is what you mean? > > if (!emp

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Bastien Koert
On Tue, Jun 30, 2009 at 12:09 PM, Miller, Terion wrote: > > > > On 6/30/09 10:40 AM, "Bastien Koert" wrote: > > On Tue, Jun 30, 2009 at 11:17 AM, Ashley > Sheridan wrote: >> On Tuesday 30 June 2009 15:42:01 Miller, Terion wrote: >>> Okay, what I am trying to do is this: >>> >>> I have a db full of

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Miller, Terion
On 6/30/09 10:40 AM, "Bastien Koert" wrote: On Tue, Jun 30, 2009 at 11:17 AM, Ashley Sheridan wrote: > On Tuesday 30 June 2009 15:42:01 Miller, Terion wrote: >> Okay, what I am trying to do is this: >> >> I have a db full of inspections, daily I need to run a script that will >> grab the posti

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Bastien Koert
On Tue, Jun 30, 2009 at 11:17 AM, Ashley Sheridan wrote: > On Tuesday 30 June 2009 15:42:01 Miller, Terion wrote: >> Okay, what I am trying to do is this: >> >> I have a db full of inspections, daily I need to run a script that will >> grab the posting of inspections, check them against the db to m

Re: [PHP] Compare and inserting with php

2009-06-30 Thread Ashley Sheridan
On Tuesday 30 June 2009 15:42:01 Miller, Terion wrote: > Okay, what I am trying to do is this: > > I have a db full of inspections, daily I need to run a script that will > grab the posting of inspections, check them against the db to make sure > they aren't duplicates and then insert all the new e

[PHP] Compare and inserting with php

2009-06-30 Thread Miller, Terion
Okay, what I am trying to do is this: I have a db full of inspections, daily I need to run a script that will grab the posting of inspections, check them against the db to make sure they aren't duplicates and then insert all the new entries. Not sure if my logic of going about it this way is r