dongwang3066 2010-06-07 14:13
浏览 27
已采纳

PHP和Oracle能否将复杂类型相互传递?

I want to pass/bind an array of (key1, key2) to an Oracle PL/SQL stored procedure using PHP. I'm able to bind primitive types and arrays of primitive types, but haven't found a way to pass complex datatypes back and forth.

Is this unsupported? So far I've been having to pass along multiple arrays -- one for each subtype in my complex type -- and then depend on their indexes to reconstitute them in the procedure.

  • 写回答

4条回答 默认 最新

  • doumi1852 2010-06-21 23:36
    关注

    Why don't you serialize the object's state as XML?

    Currently it's pretty common practice to searilize objects as XML so they can be passed across the web in a language/platform agnostic manner. Why not do the same and store it as a varchar in the DB.

    Note: The glaring deficiency of this method is you won't be able to select fields in the database by attributes of the object in a clean manner because it mixes multiple attributes of the object in one field of the database.

    If you do need the attributes of the object to be searchable, you'll need to break out the data from each of the object's attributes into their own respective fields.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料