Home »
Imported messages »
comp.lang.php »
Evaluating an expression
Evaluating an expression [message #170852] |
Fri, 03 December 2010 14:19 |
John
Messages: 18 Registered: September 2010
Karma:
|
Junior Member |
|
|
Clutching at straws here but I have a problem that seems to occur if
the web users browser/system 'goes down' i.e. not very often.
My specific question is, do these two expressions always equate to the
same thing?
if ($o1) {
and
if ($o1 == 1) {
The variable is set as follows just before the above code:
$o1 = $sql -> cust_comp;
cust-comp is tinyint(1) default to zero on the database.
The code allows someone to partially complete an order and then go
back later until the order is sent. The cust_comp field is then
written to the database with a value of 1. When customers continue
processing (straight away or after logging in again) the system reads
this value and assumes they want to now place a new order and
processing continues with the new order.
The problem I am getting is that the system seems to think the first
order is complete when it is not (cust_comp is 0 on the database entry
for the first order) and therefore starts a new one with the customer
losing their previous order details.
Hope that all makes sense. Really don't know where to look for this at
the moment so any help gratefully accepted. I suspect the error may be
elsewhere but I thought I would check this first.
--
John
|
|
|
Goto Forum:
Current Time: Thu Nov 28 12:16:43 GMT 2024
Total time taken to generate the page: 0.04380 seconds