OrderID if else statement does not

I have a page of payment if I orderID does not exist I want to create a new command id or if the orderID is using the current order id, but if it is not an empty order it does not give you a new command id

Check if there is already an order

$query = 'SELECT payment_id FROM host_payments WHERE payment_userid = %s AND payment_transaction_status = AND payment_amount_due = payment_type = LIMIT 1 %s AND %s %s';

$query = sprintf ($query $userid, $transaction_status, $amount_due, $payment_type);

$results = mysql_query ($query);

If (mysql_num_rows ($Results) > 0)

{

While ($Row = mysql_fetch_array ($Results))

{

$existing_payment_id = $row ['payment_id'];

}

}

on the other

{

Create order

$query = "INSERT INTO host_payments (payment_userid, payment_created_timestamp, payment_amount_due, payment_transaction_status, payment_type) VALUES (%s, %s, %s, %s %s)";

$query = sprintf ($query $userid, $timestamp, $amount_due, $transaction_status, $payment_type);

$results = mysql_query ($query);

$query = 'SELECT payment_id FROM host_payments WHERE payment_userid = %s AND payment_created_timestamp = AND payment_amount_due = payment_type = LIMIT 1 %s AND %s %s';

$query = sprintf ($query $userid, $timestamp, $amount_due, $payment_type);

$results = mysql_query ($query);

While ($Row = mysql_fetch_array ($Results))

{

$payment_id = $row ['payment_id'];

}

}

then

If (isset ($existing_payment_id) & &! empty ($existing_payment_id))

{

$ORDERID = $existing_payment_id;

}

on the other

{

$ORDERID = $payment_id;

}

$ORDERID = $payment_id; $existing_payment_id;

the variable I want to use at the end to send the bridge is so $ORDERID

> I need to take on more script for your suggestion to work?

You follow one of my last two suggestions!

Try this.

Check if there is already an order

$query = 'SELECT payment_id FROM host_payments WHERE payment_userid = %s AND payment_transaction_status = AND payment_amount_due = payment_type = LIMIT 1 %s AND %s %s';

$query = sprintf ($query $userid, $transaction_status, $amount_due, $payment_type);

$results = mysql_query ($query);

If (mysql_num_rows ($Results) > 0)

{

$row = mysql_fetch_array ($results)

$ORDERID = $row ['payment_id'];

}

on the other

{

Create order

$query = "INSERT INTO host_payments (payment_userid, payment_created_timestamp, payment_amount_due, payment_transaction_status, payment_type) VALUES (%s, %s, %s, %s %s)";

$query = sprintf ($query $userid, $timestamp, $amount_due, $transaction_status, $payment_type);

$results = mysql_query ($query);

$ORDERID = mysql_insert_id();

}

Tags: Dreamweaver

Similar Questions

  • If the else statement does not work... worked in AS2?

    Hello

    have a very common function that I use in educational quiz itself noted the user according to their score (from answering multiple choice questions). So I put in place a variable called score without problem... but when I apply my confidence "if else"heuristic of AS2... I have all these errors and my flash file does not work. "

    Is there a better way to code that I'm not aware of?

    Stop();

    If (score < = 5) {}
    endMsg.gotoAndStop ("score1");
    } Else if (score > 6 and score < = 11) {}
    endMsg.gotoAndStop ("score2");
    } else {}
    endMsg.gotoAndStop ("score3");
    }

    feedback video called "endMsg" - according to the function, navigates user to label that provides feedback.

    Any help would be awesome... coz this feature used to work! It doesn't work even in Flash CS4 when I retrograde Panel actionScript to version 2 to test!

    I missed using try IT...

    } Else if (score > = 6 & score)<=>

    I know they used to support the use of words for or, but never made a practice of it, so I can't say if they do not support in AS3.  In addition, as long as there will be a score of 5.5, you should be fine.

  • If an else statement does not

    I'm sure have the conditions and statements typed in wrong. Here is the original code:

    Stop();

    var my_timedReveal:Number = setTimeout (my_delayedReveal, 15000: 1);

    function my_delayedReveal (arg1) {}
    gotoAndPlay ("reveal2");
    }

    cardA .mouse .addListener (mouseDown);
    cardB.Mouse.addListener (mouseDown);
    cardC.Mouse.addListener (mouseDown);

    cardA.onRelease = function() {}
    gotoAndPlay ("reveal1");
    }

    cardB.onRelease = function() {}
    gotoAndPlay ("reveal2");
    }

    cardC.onRelease = function() {}
    gotoAndPlay ("reveal3");
    }

    only now, I want to add an if/else statement so that if none of the mouseDown conditions are met, it will then the variable timeout:

    I have not tried or no this result:

    var my_timedReveal:Number = setTimeout (my_delayedReveal, 15000: 1);

    If (cardA .mouseDown = true) {}
    gotoAndStop ("reveal2")
    }

    else {}
    my_delayedReveal = true;
    }

    What Miss me? Am I even close?

    I have not tried to reason with your code, but when you compare things to equal you use is, not =

    If (cardA .mouseDown == true) {}

    And in the case of a boolean comparison, like that you can just use...

    If {(cardA .mouseDown)

    So see if what you're trying or could have tried to work when you use the comparison properly.

  • So then the Else statement does not not under calculation in APEX

    Hello

    Can someone help me where I'm wrong? I try to use the following code in the calculation process on submit. I'm not able to get the value. It shows nothing.

    *

    Point calculation

    Top

    *

    Source

    Top

    *

    BEGIN

    IF: P3_AGING_DAYS < = '0' THEN

    : P3_AGING_BUCKET: = 'to breast due date';

    elsif: P3_AGING_DAYS > AND '0': P3_AGING_DAYS < = "3" then

    : P3_AGING_BUCKET: = 'within 3 days.

    end if;

    end;

    1efb2968-171D-43f9-9d5d-d38151735ed7 wrote:

    Please update your forum profile with a real handle instead of '1efb2968-171d-43f9-9d5d-d38151735ed7 '.

    Can someone help me where I'm wrong? I try to use the following code in the calculation process on submit. I'm not able to get the value. It shows nothing.

    BEGIN

    IF: P3_AGING_DAYS<= '0'="">

    : P3_AGING_BUCKET: = 'to breast due date';

    elsif: P3_AGING_DAYS > AND '0': P3_AGING_DAYS<= '3'="">

    : P3_AGING_BUCKET: = 'within 3 days.

    end if;

    end;

    A calculation of body of the PL/SQL function must return a value, rather than to assign to an element in the PL/SQL block (APEX turns the block in the body of a function). The element for which the value should be calculated is specified in the properties of computation (P3_AGING_BUCKET).

    begin
      return case
               when :p3_aging_days < 1
               then
                 'Within due date'
               when :p3_aging_days between 1 and 3
               then
                 'Within 3 days'
             end;
    end;
    
  • If Else still does not... help!

    Hello
    I try to get four values to add up and be passed to another frame, but I need to check that the four fields are not empty or add up to less than 100 (percent). For some reason even if the four fields add up and the amounts are calculated according to my code - the if else statement does not work!

    Maybe it's the wrong place (although if I move it I get NaN) for amounts so... can someone explain why this is not done or how to change it so it works with the rest of the code?

    Thank you
    E
    Calculates the total price, empty field checking
    and the percentage do not add to 100.

    two_btn.onPress = function() {}
    priceTotal_txt.text = number (field1) + number (Field2) + number (field3), number (field4);
    MyTotal = parseInt (priceTotal_txt.text) / 60 31;
    MobTot = parseInt (mbcalls_txt.text);
    If ((priceTotal_txt.text == null) |) (priceTotal_txt. Text < 100)) {}
    gotoAndStop ("error");
    } else {}
    _root.gotoAndStop (15) ;}
    };

    What happened to the code I posted earlier (again joint).
    Use the code as what and do not use a onEnterFrame handler.
    So, this part is the problem:
    this.onEnterFrame = function () {}
    Field1 = number (qty1_txt.text) * Number (seconds1);
    Field2 = number (qty2_txt.text) * Number (seconds2);
    field3 = number (qty3_txt.text) * Number (minutes1);
    Field4 = number (qty4_txt.text) * Number (minutes2);
    };

  • Active state does not properly in Chrome

    Hello

    I recently exported the site I created in HTML and everything seems to work well. The only problem I encounter is that active State does not work in Chrome. When I scroll to the bottom of the page, the color of the active state is not reflected. This does not work in IE, Safari and Firefox. Really need this to be resolved soon. Help, please!

    Thank you!

    Ryan

    Hi whyax84 and Zak.

    Download Yes it indeed solved the problem for chrome. Thank you very much!

    Kelvin

  • ORA-13780: SQL statement does not exist

    Hello
    on the 11g R2, I get the following message:
    SQL> variable stmt_task VARCHAR2(64);
    SQL> EXEC :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd');
    BEGIN :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd'); END;
    
    *
    ERROR at line 1:
    ORA-13780: SQL statement does not exist.
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.PRVT_SQLADV_INFRA", line 125
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 655
    ORA-06512: at line 1
    Any idea?

    Thank you.

    Sql and the sql_id execution plan has been emptied out of the shared pool, so oracle could not find it.

    -Thank you

  • Rollover State does not not on active state

    Hi, I have a problem with the menu States. The rollover State does not work when a menu item is in its active state. This is supposed to happen or is there a solution to this?

    Thank you.

    Hello

    This works as expected. Active state removes change it to any other State on the interaction of the mouse and other States work only on the links that are currently in Normal condition.

    See also: https://forums.adobe.com/thread/1136562

    See you soon,.

    Vikas

  • Menu rollover State does not have the button active parent

    My menu rollover State does not work the button parent in my menu while I'm on a page of the child. I didn't have any currently active States in the menu. How can I get the parent menu to respect the rollover State even while I'm on one of the child pages?

    Please check this thread:

    https://forums.Adobe.com/message/6148234#6148234

    Thank you

    Sanjit

  • Delete statement does not work properly

    Hello

    The following delete statement does not work correctly.
    If I press DELETE will delete everything in the table of categories
    I don't know whats wrong with it.
    -Delete category line if there is not the infrastructure to support-
    IF: P12_DFCY_SEQNO4 IS NOT NULL AND: P12_DFCY_CATG_C = "7" THEN
    REMOVE FROM DFCY_CATG
    IF NOT EXISTS (SELECT I.DFCY_SEQNO
    OF DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND: P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;

    Thank you
    Mary

    You probably the where more clause:

    DELETE FROM DFCY_CATG
    WHERE C.DFCY_SEQNO = :P12_DFCY_SEQNO4
    AND NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    

    Not sure if this is the exact name of your column in the table, but that limit the scope of deleting just a record that you control.

    Hope it will be useful,

    Aaron

  • If the statement does not work/be executed

    I have a button that makes a flip on the x axis 180 if his name is not in a table called "shutters", it determines this by running an if statement. If his name is in the table then the button to run the code to do the folding panels. However, it is not. He let the sign flip one way, but does not have the code for it folding. I was wondering if someone could take a look to see if they know why...

    Code is linked below.

    http://pastebin.com/mc7457

    Thank you

    I don't want to pretend that I understand what you try to do it with the code, but the last section to see ms to be a little hard to swallow.  I don't see any sense in declaring conditionally works, in the call to them.  If I had to guess at a rewrite of the code, it would be...

    photosPane.addEventListener (MouseEvent.CLICK, photoinout);

    function photoinout(e:MouseEvent):void {}
    If (panes.indexOf ("photos") =-1) {}
    addEventListener (Event.ENTER_FRAME, photosrotate);
    Panes.push ("photos");
    trace (Panes);
    } ElseIf (panes.indexOf ("photos") = 0) {}
    addEventListener (Event.ENTER_FRAME, photosrotateout);
    trace ("stuff");
    }
    }

    And insofar as these ENTER_FRAME listeners go, you should remove them in the functions they call as soon as they reached their goal.  Otherwise, they will continue to call these functions several times.  Example:

    function photosrotate(event:Event):void {}
    If (photos.rotationX<>
    photos.rotationX += 6;
    } else {}
    removeEventListener (Event.ENTER_FRAME, photosrotate);
    }
    }

    And, as I said, due to my lack understanding, if my remarks do not apply, I meant no harm.

  • When I right click on a pohto (set as background on your desktop) statement does not appear

    I am using windows 7 starter edition.

    When I right click on a personal photo statement, appearing as a background does not appear, so I am unable to put my favorite as a background picture.

    I appriciate if you would kindly solve this problem

    Windows 7 Starter Edition does not have the wallpaper to change - its design and not a problem with your PC.

    If you want this installation, you can either use the 3rd party hacks/software (which I do not recommend) or pay for an upgrade to a higher edition of Windows 7 Home Premium.

  • CASE STATEMENT DOES NOT HIERARCHY

    Hi Experts

    I have this case statement:

    BOX WHEN ' @{pvCalType} "="Cal1"THEN"Calendar Cal1"". "" Year. "

    WHEN ' @{pvCalType} "="Cal2"THEN"Calendar Cal2"". "" Year

    ANOTHER NULL

    END

    All the columns in the YEAR of different sizes have properties of the hierarchy.

    When I view my results of this statement, there is no hierarchy.

    I want the hierarchy in order to drill down of the YEAR > QUARTER > MONTHS

    Help, please.

    Hello

    do you have other possible values for "pvCalType"?

    If not try this formula: "@{pvCalType} schedule". " Year. "

    (not sure this is the right syntax, if it does not work after the return of the error and I get the right thing...)

  • ExtendScript If Else (otherwise does not)

    Hello all, my first post and hoping you can help!

    To help with my learning ExtendScript I wrote a script for a function of trim paths. Almost there but the other part of my if else statement will fail.

    I simplified it down to this: check if there is already a property path trim on the selected layer. If so, get a confirmation before delete and add another. If not, add a new.

    var curLayer = app.project.activeItem.selectedLayers;
    var shapeLayerContents = curLayer[0].property("Contents");
    var existingTrimPath = shapeLayerContents.property("ADBE Vector Filter - Trim");
    
    
    // CHECK FOR EXISTING TRIM PATH
    if (shapeLayerContents = shapeLayerContents.property("ADBE Vector Filter - Trim")) {
    
    
        var check = confirm("TrimPaths already exist! Remove and continue?",true);
                    if(check == true){
                       
                     // DELETE EXISTING TRIM PATH 
                     existingTrimPath.remove();
    
                    // ADD NEW TRIM PATH
                    var curLayer = app.project.activeItem.selectedLayers;
                    var shapeLayerContents = curLayer[0].property("Contents");
                    var trimPath = shapeLayerContents.addProperty("ADBE Vector Filter - Trim");
                   
                    } else {
                    trimPath;
                     }
    }
    

    Tried every possible combination I can think, but without success. Any help would be really appreciated! Thank you!

    James

    No, there is no way to ready to use to redefine a property. To reset a property group, you must delete all keyframes, all expressions and set the default value for all properties in this group changes. More painful and may be longer that your method, so keep it!

    For your immediate problem, as Dan already said, you should not redefine the curLayer and shapeLayerContents variables, including redefining shapeLayerContents inside the "if" is not great. Use the existingTrimPath variable in the if() function:

    var trimPath;
    var curLayer = app.project.activeItem.selectedLayers[0];
    var shapeLayerContents = curLayer.property("Contents");
    var existingTrimPath = shapeLayerContents.property("ADBE Vector Filter - Trim");
    var index;
    
    // CHECK FOR EXISTING TRIM PATH
    if (existingTrimPath !== null) {
        if(confirm("TrimPaths already exist! Remove and continue?",true)){
            // DELETE EXISTING TRIM PATH
            index = existingTrimPath.propertyIndex;
            existingTrimPath.remove();
            trimPath = shapeLayerContents.addProperty("ADBE Vector Filter - Trim");
            trimPath.moveTo(index);
            };
        }
    else {
        // ADD NEW TRIM PATH
        trimPath = shapeLayerContents.addProperty("ADBE Vector Filter - Trim");
        };
    

    Something like that.

    Xavier

  • Captivate 9 Drag and Drop DropIncorrect State does not

    Hello!

    I ve done a Drag and Drop interaction, where I have 4 targets and 4 drag only one correct answer for each of the sources. I've added States for Drop targets:

    DropCorrect State, The target turns Green when pressing submit, and the answer is correct.

    DropIncorrect State, target Drop becomes Red when press submit and answer is incorrect.

    I thought that it would be a good way to show the user which targets Drop are correct and which aims to drop they must change to get the right answer.

    When the answer is correct, Drop targets turns green and I made an action that says "OK, click anywhere to continue."

    BUT when the answer is wrong, nothing happens to the colors of the Drop target. It s just a failed, Try Again message. Nothing more.

    Why isn´t the State DropIncorrect showing when I press the submit button and the answer is incorrect?

    I just checked the file of this article, which was created on an earlier version of 9 and it works well also for the State of DropInCorrect, but I have only 1 attempt! I suspect that your endless attempts are the cause of the DropIncorrect does not. Compare it with actions on a question slide: success action will be performed when the answer is correct, but the other action will be done only at the last attempt is finished and the answer is wrong. Since you have endless attempts, this last attempt event never occurs.

    Sorry for the late reply, wanted to check a second time and has been very busy today.

Maybe you are looking for

  • I don't want passwords on my Thunderbird e-mail account. How can I achieve this? Sys running. 8.1

    For a long time, I have been using my Thunderbird e-mail account without password. All of a sudden it is requiring a password once again, and I can't seem to bypass. Any ideas?

  • Satellite Pro P100: How to recover BONES after replacing HARD drive

    Hello I bought a satellite Pro P100, and I want to change my hard driveI have the CD restored, but I think that this will not work with a new hard drive!What can I do to recover my windows? Sorry for my englich! Thank you

  • Do I have a Trojan horse virus?

    Mac G5 10.6.8 Snow leopard A year ago, I was on youtube and I clicked on a link and then I got a pop up warning for a Trojan horse. I left Safari, stop my computer and Safari uninstalled and reinstalled. Months later I began to purge all the file nam

  • Install HP Officejet 6310, printer all in one

    I loaded and began to run the instalation of the complete software for the HP Officejet 6310 printer all-in-one on my new Dell Inspiron N7110 Notebooks. It runs Windows 7-64 bit. After the end of the excerpt, it stops just running. It should go in th

  • Icons cannot be moved on the desktop

    I just changed my desktop image.  I noticed the trash moved to the side left (he was on the right side at the start) in line with my other icons.  When I try to drag the icon to the trash to another area on the desktop, it jumps to the left side.  Wh