0

Help me. I can't run php script for select data from oracle. It doesn't runs. Error code: Warning: oci_execute(): ORA-00911:

This is my sql code:

select dn.def,
       (select te.err_comment
          from crt.crt_transfers_error_messages te
         where t.error_error_id = te.error_id),
       t.amount,t.msisdn_from,t.msisdn_to,t.insert_date,t.confirm_date   from crt.crt_transfers t,
       crt.crt_transfer_statuses ts,
       crt.sc_dictionaries_nls dn where ts.sdct_sdct_id = dn.sdct_sdct_id    and t.trst_trst_id = ts.trst_id    and t.msisdn_from = 992909119113
    order by insert_date desc;
2
  • Post your php aswell. Commented Feb 2, 2015 at 11:22
  • $conn = oci_connect("ro", "roo", "tm.mmm.ru"); $query_1 = "select dn.def, (select te.err_comment from crt.crt_transfers_error_messages te where t.error_error_id = te.error_id), t.amount,t.msisdn_from,t.msisdn_to,t.insert_date,t.confirm_date from crt.crt_transfers t, crt.crt_transfer_statuses ts, crt.sc_dictionaries_nls dn where ts.sdct_sdct_id = dn.sdct_sdct_id and t.trst_trst_id = ts.trst_id and t.msisdn_from = 992909119113 order by insert_date desc;"; $s_1 = oci_parse($conn, $query_1); oci_execute($s_1); oci_fetch_all($s_1, $arr_1); Commented Feb 2, 2015 at 11:28

1 Answer 1

1

ORA-00911: invalid character

Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by double quotes may contain any character other than a double quote. Alternative quotes (q"#...#") cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual. Action: none

Looks, like you have a problem with the insertion of your variables into the SQL statement.

echo out the query right before you execute it, and you will probably find a php variable within that has not been replaced by its value

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.