|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
A Simple Math Function
or so I thought!
Can anyone tell the correct syntax for the following? php Code:
Basically, the $confirm_tickets is generated from a form, then the email address is validated in the database, and the total number of tickets they have ordered previously, should be added to the $confirm_tickets and the row in the database updated. However, the $confirm_tickets total is always used and replaces the $new_ticket_total in the database so both columns display the same! |
|
#2
|
|||
|
|||
|
RE: A Simple Math Function
Are you sure that $row[11] is where the current_ticket_total is stored? Remember that database fields start at 0, not 1. I would echo out $confirm_tickets and $current_ticket_total before adding them together to make sure they contain what you think they contain...
|
|
#3
|
|||
|
|||
|
RE: A Simple Math Function
$row =Â*mysql_fetch_row($check_result);
$current_ticket_total =Â*$row[11]; You know that $row[11] would be referring to a column in the table that your fetching in $check_results. Let me see $check_results -- it might help a little ;) |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > A Simple Math Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|