Simple PHP and PLSQL Bind help needed

HI,
I am learning php and oracle I am trying to bind my plsql code with php but have little idea can anyone plese help?.
my code is
plsql prcoedure
CREATE OR REPLACE PROCEDURE get_width (
img_id IN arm_photos.id%TYPE
AS
image ORDSYS.ORDImage;
width INTEGER;
BEGIN
SELECT p.image INTO image FROM arm_photos p
WHERE p.id = img_id;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;
PHP code
<?php
$c =oci_connect('user', 'pass' , '//localhost/orcl');
$s = oci_parse($c, " begin
get_width(:id :width)");
oci_bind_by_name($s, ':id', $id);
oci_bind_by_name($s, ':width', $width);
$id= 1235;
oci_execute($s);
?>

Variable width is a local variable. You can't get its value from outside SP. Either change your procedure to a function returning image width or add a second out parameter:
CREATE OR REPLACE PROCEDURE get_width (
img_id IN arm_photos.id%TYPE,width OUT INTEGER
AS
image ORDSYS.ORDImage;
BEGIN
SELECT p.image INTO image FROM arm_photos p
WHERE p.id = img_id;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;SY.

Similar Messages

  • Demoting a DC and Group policy, help needed.

    Hi all,
    so we have 3 domain controllers, lets say dc1,dc2 and dc3. We have the 3rd line assistance from another company, they have advised the following.... 
    SO the stages will be
    1) Can you please go through all the GPO's in DC3 and consolidate what you need and what you do not need, you need to extensively cross reference this with DC1 and DC2, this is something you have to do. As I will not know what you need and what you do
    not. You can do this by logging into each domain controller and opening up the settings of each GPO and cross referencing.
    2) Once the above is done, we will consolidate the GPO's to a central repository in your domain
    3) Backup Sysvol directory and Netlogon folder in DC3
    3) Proceed to dcpromo DC3 out of the domain
    4) Test connectivity if clients to the AD
    5) Add the additional Server options
    6) All of the above can be done during office hours.
    it was my understanding (perhaps wrongly) that the group policies were not on the individual Domain Controllers but in Sysvol and as such replicated anyway?
    any advice would be very much appreciated.

    > I am being told that our Group policies are different across different
    > Domain Controllers and to my knowledge that's impossible as we have
    > discussed it should be in the replicated Sysvol.
    Ok, that's a common problem. Fix it and you will be fine:
    http//support.microsoft.com/kb/2218556 (for DFS-R Replication of Sysvol)
    http://support.microsoft.com/kb/315457 (for NTFRS replication)
    > I'm a bit lost on the central repository aspect but prior to saying it
    > makes no sense I just wanted to check my understanding, especially with
    > an MVP!
    I agree. Talking of a "central repository" fro group policy doesn't make
    sense, because group policy from the very beginning lives in AD and
    sysvol, which both are kind of "central repository". Seems they don't
    really know what they're talking about :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Find and Replace text and change font help needed.

    I am completely new to Scripting and I'm sure this is quite simple but I do not know where to start.
    I have a FM template that is populated with "raw" text from a database.
    Within the text are several characters (+, @, *, $, # and %).
    I need to replace these characters with symbols from a different font e.g.:
    Each instance of:
    "+" to be replaced with Wingdings 2 font - Lowercase t
    "@" to be replaced with Wingdings 2 font - Lowercase u
    "*"  to be replaced with Wingdings font - Uppercase E   etc.
    I would like to automate the process and believe a script would enable me to do this.
    I have tried looking on the forum, but can not find anything suitable to help me (or I'm looking in the wrong place).
    Any help would be greatly appreciated.
    Cheers
    Kev

    not really
    important is the Illustrator Text Object-model, which is not very easy to understand.
    And the Core JS String and regExp Objekts.
    Have a look at this:
    http://www.ogebab.de/home/skripte/text/replace
    The dialog is poor (because of compatibility) and it works simply on TextFrames.contents, i don't know if this is good i all cases.
    But i use it not very often so i don't want to rewrite it.
    Maybe it is a starting-point for you.
    But maybe it is more then you need.
    try this:
    //select a text
    var text = app.activeDocument.selection[0];
    var string = text.contents;
    string = string.replace(/ /g,"  ");
    text.contents= string;
    / /g is a regular expression
    .replace() is a method of the String Object
    both explained at
    https://developer.mozilla.org/en/JavaScript/Reference

  • Unicode and ascii conversion help needed

    I am trying to read passwords from a foxpro .dbf. The encrpytion of the password is crude, it takes the ascii value of each char entered and adds an integer value to it, then stores the complete password to the table. So to decode, just subtract same integer value from each chars retieved from .dbf. pretty simple.
    The problem is that java chars and strings are unicode, so when my java applet retrieves these ascii values from the .dbf they are treated as unicode chars, if the ascii value is over 127 I have problems.
    The question. how can i retrieve these ascii values as ascii values in java?
    Should I use an InputStream like:
    InputStream is=rs.getAsciiStream("password");
    Is there a way to convert from unicode to extended ascii?
    Some examples would be helpful, Thanks in advance.

    version 1
    import java.nio.charset.Charset;
    import java.nio.ByteBuffer;
    import java.nio.CharBuffer;
    class Test {
        static char[] asciiToChar(byte[] b) {
            Charset cs = Charset.forName("ASCII");
            ByteBuffer bbuf = ByteBuffer.wrap(b);
            CharBuffer cbuf = cs.decode(bbuf);
            return cbuf.array();
        static byte[] charToAscii(char[] c) {
            Charset cs = Charset.forName("ASCII");
            CharBuffer cbuf = CharBuffer.wrap(c);
            ByteBuffer bbuf = cs.encode(cbuf);
            return bbuf.array();
    }version 2
    import java.io.*;
    import java.nio.charset.Charset;
    class Test {
        static char[] asciiToChar(byte[] b) throws IOException {
            Charset cs = Charset.forName("ASCII");
            ByteArrayInputStream bis = new ByteArrayInputStream(b);
            InputStreamReader isr = new InputStreamReader(bis, cs);
            char[] c = new char[b.length];
            isr.read(c, 0, c.length);
            return c;
        static byte[] charToAscii(char[] c) throws IOException {
            Charset cs = Charset.forName("ASCII");
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            OutputStreamWriter osw = new OutputStreamWriter(bos, cs);
            osw.write(c, 0, c.length);
            osw.flush();
            byte[] b = bos.toByteArray();
            return b;
    }

  • Posting a Question and iPod mini help needed

    It's so frustrating to use this support site. I can't seem to find the right information.
    I need help. My iPod mini just suddenly conked out on me. Now it flashes the apple then an icon with a battery and an exclamation point inside a triangle. I tried to search for an answer in this site but all I got was a suggestion to reset it. I tried re-setting it and IT DIDN'T WORK!
    What do I do now? I really want to get this fixed as soon as possible. I happen to love my iPod. Please, please, someone help!

    Welcome to Apple Discussions, serangel.
    Here is the support site for using iPod mini.
    There are plenty of users there who will be happy to help.
    Cheers!

  • GROUP BY and ORDER BY help needed

    I have got an sql query where I have the need to pull out the latest copy of duplicate info, but what is happening is that the first instance is being displayed. The query I have is this:
    SELECT *
    FROM tbl_maincontenttext
    WHERE fld_menusection = 3
    GROUP BY fld_webpage
    ORDER BY fld_timedate DESC
    Basically, I have content that is listed under menu section 3, but within that I will have several copies of content that will relate to a specific webpage (eg: about us). What is currently happening is that GROUP BY is obviously grouping the similarly named 'about us', but it is pulling the first record it comes across out of the database rather than the latest updated record.
    As you can see, I am trying to get the query to order by fld_timedate which is a CURRENT_TIMESTAMP, but it's not working!
    I'm hoping that there is some sort of SQL that I am unaware of that will help me group by and display the latest update/content.
    Thanks.
    Mat

    It would help if you could show us the table definition. Your SQL statement is ambigous because you are selecting all table columns, yet only including one column in the group by clause.  A SQL statement must contain all selected columns that are not aggregates. Most DBMS will return an error for this statement. Others that don't return an error will return unexpected results.

  • Validation and Substitutions - Urgent Help needed

    Hello everyone,
    I need your help about this. This is the first time i am going to create a validation for document no. line items.
    The scenario is this:
    1. I need to check if the FI document that is to be posted contains line items where BSEG-LOKKT falls within the range of “0099990000-0099999999”. For each matching line item, I need to check if the credit line items balances with the debit line items. If TRUE then the validation will EXIT succesfully.
    2. If an FI document contains line items where BSEG-LOKKT falls within the range of “0099990000-0099999999”, but the sum of the debit line items and the credit line items is not equal to zero, validation will prevent thre user from posting the document. Error message will be raised.
    3. If FI document document does not contain line items with BSEG-LOKKT ranging from “0099990000-0099999999”, validation will exit successfully because there are no appropriate alternative accts to be verified.
    This validation will only apply to one company code.
    Please provide me with the step-by-step creation of the validation.
    Points will be rewarded for helpful answers.
    Thanks in advance.
    Bay

    look tcode ob28, validation exit and <a href="http://help.sap.com/saphelp_47x200/helpdata/en/5b/d231e143c611d182b30000e829fbfe/frameset.htm">here</a>
    A.

  • Middleware and Adapter Object help needed

    Hi all,
    We are trying to replicate business agreements from CRM to contract accounts in our R/3 IS-U system. We've followed the various cookbooks and guidelines but have so far been unsuccessful. For object BUAG_MAIN, is an adapter object needed? If so, we are unable to find one in R3AC1.
    If we check the BDoc message, we are getting two Technical errors after creating the business agreement:
    1. "Outbound call for BDoc type BUAG_MAIN to adapter module CRM_UPLOAD_TO_OLTP failed."
    2. "Service that caused the error: SMW3_OUTBOUNDADP_CALLADAPTERS"
    Any ideas? Points will be awarded for helpful responses. Thanks in advance.
    Message was edited by:
            John S

    So in R3AC1 there is a button to show inactive adapter objects. Hitting this showed BUAG_MAIN. After that, we opened BUAG_MAIN and activated the object. This resulted in a couple of changes that we clicked through. We then were able to do an initial load of the business agreements and replications of newly created ones happened thereafter.

  • Dynamic link and workflow optimization help needed

    As a vlogger I just tried out a brandnew method to save time and renders. Instead of editing every clip separately in After Effects and then rendering it and then do the final edit in Premiere, I just edit immediately in Premiere, then when it's finished editing I do a global color correction in AE via Dynamic link. I'm just kinda worried the results are bad. Do you think it sucks? Do you like it? Would you subscribe? Do you wanna see other vlogs?
    your opinion helps me more then you think.
    your good friend,
    ck

    Edit in Premier then dynamic link to AE is the usual workflow. I've been doing a bit of color grading lately but I'm still not on par with the terms a colorist would use but I think the vid has a dreary look to it. Dark, not much contrast, needs more tone? Also advice on vlogging sounds like a post for the video lounge.

  • A little assistance and some big help needed

    I seem to be running into a problem migrating an MSAccess 2000 database to XE.
    I open the omwb2000.mde, select the database and define the location for the schema and data export.
    The DAO msi opens and I get error 1706. No Valid Source could be found for product DAO. the windows installer cannot continue.
    If I cancel the DAO and if I add forms and reports from the .mde I get error #5 - XML Exporter. Invalid procedure or call argument (the database location) Database Schema Export did not complete successfully.
    Any help is very appreciated.
    My local environment is:
    Win XP SP2
    Office 03 SP2
    Oracle XE
    OMWB 10.1.0.4.0

    Hi,
    Have you tried re-registering the DAO dao360.dll? If, for some reason, your MDAC install has gotten corrupt, you'll need to re-register. Try executing the following from the Start | Run command:
    regsvr32 "c:\program files\common files\microsoft shared\dao\dao360.dll"
    I would also recommend using the omwb2003.mde, and converting your MS Access 2000 database to 2003, seeing as you have MS Access 2003 installed on your machine. We recommend using the version of the Exporter Tool that corresponds with the version of MS Access installed on your machine.
    I hope this helps.
    Regards,
    Hilary

  • US iBook and UK Keyboard help needed..

    Hey there.
    Some time ago my girlfriend bought an iBook G4 from eBay. We both use the iBook and use a UK Mac keyboard with it, the only problem is is that the pound sign, when used comes out as the $ sign on the iBook and # when using the UK keyboard. Number 3 is supposed to be the pound sign when shift and 3 are pressed, how do assign the key to show the pound sign? It's annoying cause' everytime we need to use the sign we have to resort to using the 'special characters' option. I hope someone can help, thanks!

    Hi Tymon,
    You will need to set your keyboard input menu to UK. Do the following:
    1. Fire up System Preferences
    2. Select the International icon
    3. Within the International preferences window select the Input Menu tab
    4. Ensure Keyboard Viewer is ticked (not needed here but very useful to have available)
    5. Scroll down and tick on the British Keyboard box
    6. If it's not already ticked, select the "Show input menu in menu bar" box (bottom left of the window).
    That's it. You will now notice a flag in the top right of the menubar. It should be the British flag. If not, simply click on the flag and select British. Your keyboard input layout should now be in the familiar British flavour.
    Kryten

  • MAC OS-X Lion and Error 51 - Help Needed ASAP Please

    Greetings,
    I have been using the Cisco VPN Client (4.9.01) for Mac under Snow Leopard (10.6.x) without any issues.
    Since upgrading to Lion earlier today I am now receiving an Error 51 - unable to communicate with the subsystem.
    I found a thread that suggested restarting the system while holding down Opt/3/2 keys to force a 32-Bit restart and the Client will indeed run. However, this is a bandaid patch.
    Has Cisco addressed this issue? Is there a better workaround at this time?
    Thank you,
    Lyman

    Hello Robert,
    In Windows 7 you would need to use the Cisco IPsec client which operates the same way as it does in XP with regards to the pcf.  So I am not sure why you are having trouble with Win7, if you are still having trouble with Win7 using the Cisco IPsec client please start a new thread for that specific issue as it is separate and distinct from Mac OS X and using the Mac OS X built in client.
    Did you follow this guide:
    http://anders.com/guides/native-cisco-vpn-on-mac-os-x/
    Thanks tomas.truchly.
    I have not heard of an issue with the Mac OS X Built-in client when properly configured and when the head-end has the security levels necessary.
    Also, since this thread has been Answered, to help ensure you get the help you need it might be best to open a new thread.
    -Craig

  • ITunes and iPod, serious help needed

    First of all I'm running OS X Tiger 10.4
    I just got my 5th gen. iPod video today, and I sync'd it and everything, the iPod works just fine.
    Although, everytime I plug it in, my iPod will be listed on the source list in the left of iTunes, it will take a few seconds to update, then my iPod icon will disappear from the Finder.
    If I then click anywhere besides "My iPod" in the iTunes source bar, like Library > Music or just a simple playlist, iTunes will unexpectedly quit. The Finder though does not give me a message saying that iTunes quit unexpectedly, it just happens. During all of this the iPod does NOT say "do not disconnect" as if it was updating.
    Help is greatly appreciated.

    I am not really sure as I have been playing it safe, sticking with OS 10.3.9 and iTunes version 6. Everything works, so I don't want to break it.
    Patrick

  • K8N SLI-FI and GF 6800GS help needed!

    I have GAINWARD GeFORCE 6800GS 512MB that needs two 4-pin connectors for power supply and there is one on mainboard for supplying PCI-E with power. My question is: when i connect both power supply on VGA card is it needed also to connect one on mainboard?
    pls help!!!
    thx

    Hello !!
    Yes, all the motherboard connectors must be attached. Otherwise you will see stability problems while stressing the GPU.
    Greetz

  • Zalman CNPS9500 + Corsair XMS3500LLPRO and Neo2 Platinum Help Needed!

    I have just received the memory in my sig and need to install it in Dimms 1&2 closest to the cpu because dimm 4 is going bad I think? My old ram XMS 3200LL 2x512 has been running  Dual Channel in slots 3&4,  recently my PC has been getting random BSOD and taking a long time to get past the black w/ windows boot screen. If I put memory in slots 1&2 the problems go away.
    Anyway, this new memory is the Pro and it is too tall for slots 1&2 so I need to know if the new Zalman (http://www.frozencpu.com/cpu-zal-19.html) will block the ram slots ? The Zalman I use now prevents me from using my new ram. Or, should I try to modify the fins to allow the needed clearance?
    THX,
    Plumbergeek

    Quote from: Bas on 30-January-06, 09:23:22
    I don't use water myself...I like beer better
    i've tried that, but i always found the reservoir empty after a good party night  . must be leaking somewhere 
    now, i think that the best option for a heatsink and fan would be the xp-90 coupled with a panaflo or papst fan. there's nothing that beats that combination at that price. for water cooling, there are many options out there, and everything depends on the budget. you can get kits ranging from 80$ to 300$ or more. so it might help if you can give us an idea on the budget you have for spending.
    btw, the amd stock cooler is quite good, i was really amazed with what it can do (check my sig). compared to the intel stock hsf this one is in a different league.

Maybe you are looking for

  • Report Viewer goes to a Blank Screen

    Post Author: DHitten CA Forum: JAVA I'm attempting to implement the Crystal Reports XI JRC and can get it to succesfully render the report and all the associated tool bars, as well as preform the functions that the tools do.    The Issue I'm having i

  • Fine tuning my new system

    I have a G4 duel with lots of 3rd party software installed and that has caused all kinds of issues with final cut express HD. As a result I have just purchased an end of line G5 17" imac at a good discount, it shipped with Panther OSX(10.3.5) Superdr

  • I would like to change the default location  TextEdit file opens at.

    I would like a TextEdit file to open on the right hand side of my desktop while keeping my dock on the left side. It always opens next to the dock. Is there a terminal command or any other way to change the default spot TextEdit opens? Thanks, David

  • Need to download photoshop elements 8 as laptop does not have dvd slot

    need to download photoshop elements 8 as laptop does not have dvd slot - i have original software with box and serial number - any suggestions??

  • Premiere pro has stopped working and must close

    Premier pro has been installed through CC and will not launch. 'has stopped working and must close' drivers up to date have signed in and out of CC have uninstalled and re-installed all premiere pro content including cache have changed the compatibil