On Wed,  4 Jul 2001 01:24, John (*\\*) wrote:
> Operating system: WinNT4
> PHP version:      4.0.6
> PHP Bug Type:     MySQL related
> Bug description:  Insert queries add TWO records to database
>
> All my insert queries seem to add two records to the database instead
> of one.
>
> I was using MS Access 2000 and did not have the problem. I am now using
> MySQL and all insert queries add 2 recs?!
>
> Eg.
>
> $sql = "INSERT INTO Campaign
> (CampaignName,CampaignDesc,StartDate,EndDate,CompanyId,CampaignStatus,A
>dmini stratorId) VALUES
> ('$name','$desc','$start_date','$end_date',$company_id,0,1)";
>
> $res_insert_campaign=mysql_query($sql,$conn);
>
> if (!$res_insert_campaign) {
>   return false;
> }
>
> With the
> result:
>
> CampaignId    CompanyId       AdministratorId CampaignName    CampaignDes     
>StartDate
> EndDate       ProposalPDF     InvoicePDF      CampaignStatus
>
> 11    45      1       Test All        testing 2001-07-03      2003-07-03      NULL   
> NULL    0
> 12    45      1       Test All        testing 2001-07-03      2003-07-03      NULL   
> NULL    0
>
> (2 row(s) affected)
>

Looks like you are using PHP - and it seems like you might be running the 
insert in a function given that you are returning a value?? Can you show 
a little more of your code?

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   Enter any 11-digit prime number to continue...

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to