Long query ..HELP???
Posted: Thu Jul 29, 2004 8:34 pm
hello..
I am getting the values $accountFrom , $accountTo and $amount
and i wish to use these in a query...
I am trying to update both accounts by the amount that is set by the user using a SINGLE query.. does anyone know if this can be done?
e.g. sorry for the bad SQL code
UPDATE G_ML_Account WHERE Account_Num='$accountFrom' SET MLM_Balance= MLM_Balance - '$amount'
UPDATE G_ML_Account WHERE Account_Num='$accountTo' SET MLM_Balance= MLM_Balance + '$amount'
Anyone know how i can combine these queries into 1 ??
I am getting the values $accountFrom , $accountTo and $amount
and i wish to use these in a query...
I am trying to update both accounts by the amount that is set by the user using a SINGLE query.. does anyone know if this can be done?
e.g. sorry for the bad SQL code
UPDATE G_ML_Account WHERE Account_Num='$accountFrom' SET MLM_Balance= MLM_Balance - '$amount'
UPDATE G_ML_Account WHERE Account_Num='$accountTo' SET MLM_Balance= MLM_Balance + '$amount'
Anyone know how i can combine these queries into 1 ??