Announcement

Collapse
No announcement yet.

Can anyone help me

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can anyone help me

    I have a code like this

    sc_lookup(dataset,"select ID, SCTS_D, NOOA, UD from inbox where ISPROCESSED = '0'");

    $id = {dataset[0][0]};
    $tgl = {dataset[0][1]};
    $member = {dataset[0][2]};
    $pesan = {dataset[0][3]};
    $split = explode(".",$pesan);
    $split1 = $split[0];
    $split2 = $split[1];
    $split3 = $split[2];

    sc_exec_sql("INSERT INTO transaksi (IDI,tgl,member,kode,produk,idpel) VALUES ($id,$tgl,$member,$split1,$split2,$split3) ");

    sc_exec_sql("UPDATE inbox SET ISPROCESSED = '1' WHERE ID = '$id' ");

    I have check many times in my opinion there is nothing wrong, but why an error message ?

  • #2
    Originally posted by adityaarnugraha View Post
    I have a code like this

    sc_lookup(dataset,"select ID, SCTS_D, NOOA, UD from inbox where ISPROCESSED = '0'");

    $id = {dataset[0][0]};
    $tgl = {dataset[0][1]};
    $member = {dataset[0][2]};
    $pesan = {dataset[0][3]};
    $split = explode(".",$pesan);
    $split1 = $split[0];
    $split2 = $split[1];
    $split3 = $split[2];

    sc_exec_sql("INSERT INTO transaksi (IDI,tgl,member,kode,produk,idpel) VALUES ($id,$tgl,$member,$split1,$split2,$split3) ");

    sc_exec_sql("UPDATE inbox SET ISPROCESSED = '1' WHERE ID = '$id' ");

    I have check many times in my opinion there is nothing wrong, but why an error message ?
    after I check the variable
    $split1 = $split[0];
    $split2 = $split[1];
    $split3 = $split[2];
    can not be entered into sc_exec_sql
    I do not know why this happened, no one can help me ?

    Comment


    • #3
      What's the error message?

      AFAIK, it should be written like this
      Code:
      sc_exec_sql("INSERT INTO transaksi (IDI,tgl,member,kode,produk,idpel) VALUES ('".$id."','".$tgl."','".$member."','".$split1."','".$split2."','".$split3."') ");

      Comment


      • #4
        Originally posted by anjellz View Post
        What's the error message?

        AFAIK, it should be written like this
        Code:
        sc_exec_sql("INSERT INTO transaksi (IDI,tgl,member,kode,produk,idpel) VALUES ('".$id."','".$tgl."','".$member."','".$split1."','".$split2."','".$split3."') ");
        ok thanks, proplem solve

        Comment

        Working...
        X