Jump to content


Photo

Insert Select Question


  • Please log in to reply
1 reply to this topic

#1 WayneO

WayneO
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 February 2003 - 04:38 PM

The Insert Select command is new to me.
Would someone please tell me the error in the following:

mysql_query (\"INSERT INTO tmp_balances (bal_id,CustId,PAID,USED,Bal) SELECT ($CustId,sum($payment),sum($useage),sum($useage)-sum($payment)from transactions GROUP BY CustId)\")or die(mysql_error());

Thanks

#2 pallevillesen

pallevillesen
  • Members
  • PipPipPip
  • Advanced Member
  • 135 posts
  • LocationDenmark

Posted 18 February 2003 - 09:31 AM

Yes...

You are not inserting the bal_id....

P.
Palle Villesen, www.birc.dk [br]Bioinformatics Research Center




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users