• I think that

    Making the Web is like playing a game. Standard, Accessibility and Usability are only few rules.
    No game is awesome if you don't follow the rules.

    International Webmasters Association

  • Subscribe to my blog via email

    Insert here your e-mail address and you will receive a message when a new post will come.

oci_bind_by_name and placeholder name limit

Today I was working on a web-application using ALPHA Framework, and accidentally I discovered a problem using the oci_bind_by_name method.

The oci_bind_by_name role is to create a relationship between a php variable and an oracle placeholder (eg. :OracleVariableName)  to be used in the context of the prepared statement.

The limit is regarding the placeholder name length. Indeed it must be at maximum 30 characters long plus the colon (in total 31 chars). Otherwise oracle will output the following error:

 ORA-00972 - identifier is too long

Because the names for tables, clusters, views, indexes, synonyms, tablespaces, usernames and placeholders must be 30 characters or less, you must shorten the name to no more than 30 characters and the problem is solved.