FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Evaluating an expression
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Evaluating an expression [message #170852] Fri, 03 December 2010 14:19 Go to previous message
John is currently offline  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
[Message index]
 
Read Message
Read Message
Previous Topic: Using a debugger with PHP
Next Topic: checkbox and reload a page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 12:16:43 GMT 2024

Total time taken to generate the page: 0.04380 seconds