[FX.php List] entering data to server

Gjermund Gusland Thorsen ggt667 at gmail.com
Wed Jul 19 15:20:56 MDT 2006


Sorry forgot to tell you that you have to check errorCode for dup.

ggt667

On 7/19/06, Gjermund Gusland Thorsen <ggt667 at gmail.com> wrote:
> I think your best bet here is to do FMNew no matter what,
> but make sure the 'UserID'-field has validation of unique.
>
> ggt667
>
> On 7/19/06, David Tinoco <davet15 at hotmail.com> wrote:
> >
> > I would appreciate it if anyone could look at this code.
> >
> >  Basically, this code checks the database after an order was placed to see
> > if that customer is in the customers table. If not, then a new entry is
> > made. The primary key is the email address, which is why I added the .' " '.
> > at the front and end of $femail, or else filemaker does a search with the @
> > sign using filemaker search logic. The problem is that it is creating the
> > customer record regardless of whether it's there or not.
> >
> >  Thanks!
> >
> >
> >  $searchemail = '"'.$femail.'"';
> >  $addcust1=new FX($serverIP,$webCompanionPort);
> >  $addcust1->SetDBData('Nutrina Catalog.fp7','Customers');
> >  $addcust1->SetDBPassword($webPW,$webUN);
> >  $addcust1->AddDBParam('UserID',$searchemail);
> >  $addcust1Result=$addcust1->FMFind();
> >
> >  if($addcust1Result['foundCount']== 0){
> >  $addcust2=new FX($serverIP,$webCompanionPort);
> >  $addcust2->SetDBData('Nutrina Catalog.fp7','Customers');
> >  $addcust2->SetDBPassword($webPW,$webUN);
> >  $addcust2->AddDBParam('UserID',$femail);
> >  $addcust2->AddDBParam('First Name',$dfirst);
> >  $addcust2->AddDBParam('Last Name',$dlast);
> >  $addcust2->AddDBParam('Address',$faddress);
> >  $addcust2->AddDBParam('City',$fcity);
> >  $addcust2->AddDBParam('State',$fstate);
> >  $addcust2->AddDBParam('Zip',$fzip);
> >  $addcust2->AddDBParam('Phone',$fphone);
> >  $addcust2Result=$addcust2->FMNew();
> >  }
> >
> >
> >
> >
> > ________________________________
> > Express yourself instantly with Windows Live Messenger
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
> >
> >
> >
>


More information about the FX.php_List mailing list