Can't seem to get the ID of the last inserted record

I'm fighting to get the auto-increment the query ID.

I need the form to be submitted and on the same page, view the token ID (deuxieme in the last line of code below).

Here is the code:

<? php require_once('Connections/connection_mysqli.php');? >

<? PHP

If (! isset {})

session_start();

}

? >

<? PHP

Download MM_USERNAME modules.

$sessionusername = $_SESSION ['MM_Username"];

$u_sql = "SELECT * OF USERS WHERE username =" "." $sessionusername. » ' « ;

$u_query = $con-> query ($u_sql);

$u_row = $u_query-> fetch_assoc();

Define user variables.

$u_id = $u_row ['id'];

$u_username = $u_row ["username"];

$u_firstname = $u_row ["firstname"];

$u_lastname = $u_row ["lastname"];

$u_email = $u_row ['email'];

? >

<? PHP

Set e-mail support variables.

$s_user_id = $u_id;

$s_username = $u_username;

$s_firstname = $u_firstname;

$s_lastname = $u_lastname;

$s_email = $u_email;

$s_userlevel = $u_row ["userlevel"];

$s_subject = $_POST ["subject"];

$s_message = $_POST ['message'];

$s_status = "pending";

Submit in support table.

{if (isset($_POST['submit']))}

$s_sql = "INSERT INTO support (user_id, username, firstname, lastname, email, subject, message, status) VALUES ('$s_user_id', '$s_username', '$s_firstname', '$s_lastname', '$s_email', '$s_subject', '$s_message', '$s_status');

$s_query = $con-> query ($s_sql);

}

$last_id = $con-> insert_id;

? >

Take another look at your code. The value is assigned to $last_id, but the PHP block in your div uses $lastid. Put in underscore, and it will work.

Tags: Dreamweaver

Similar Questions

  • Can't seem to get the printer to the appropriate port to communicate with the printer Lexmark 2480.

    WndOws XP install problems with Lexmark X 2480 printer no cd

    Can't seem to get the printer to the appropriate port to communicate with the printer Lexmark 2480.  Downloaded, but prints blank pages.

    Hello, ColoChick,

    Your question must be posted in the hardware and drivers Forum.  Note the drop-down menus...

    http://answers.Microsoft.com/en-us/Windows/Forum/performance

    Search for drivers for your Lexmark printer.  The complete set is recommended for a full installation.

    http://support.Lexmark.com/index?http://support.Lexmark.com/index?locale=en&page=product&UserLocale=en_US&ProductCode=LEXMARK_X2480&focusedTab=downloads#2

    You can also try the universal print driver

    http://www1.Lexmark.com/en_US/software/UPD/index.shtml

    If possible, contact Lexmark for the installer of physical media (CD)

    Q: How can I contact the Lexmark parts?

    R: customer support is available Monday - Friday from 09:00 - 18:30 AND

    E-mail: * address email is removed from the privacy *
    Phone: 1-877-577-2787
    Fax: 1-800-258-4880

  • I can't seem to get the easy transfer Windows from Windows Vista to play with Windows 7 easy transfer and can't seem to install the transfer Windows 7 because it gives me only a 32-bit version to install.

    Windows Easy Transfer of 64-bit to 32-bit, or vice versa

    Hello

    I'm trying to fix my settings my current machien to a W7 VM user to make sure that I have the transfer settings and I get all the information I want.  My machine is 64 bit, but the VM is 32-bit.  I can't seem to get the easy transfer Windows from Windows Vista to play with Windows 7 easy transfer and can't seem to install the transfer Windows 7 because it gives me only a 32-bit version to install...

    How I have a 64-bit Windows 7 Easy Transfer to install and if I get one to install and build a transfer saved the data file has there 'restore' on a 32-bit Windows?

    George George P Botuwell, programmer

    Hi George P Boutwell,.

    Thank you for using answers Forum.

    I think that VMware has a 64-bit/function version. You will need to contact them to verify this.
    64-bit to 32-bit is not supported by Windows Easy Transfer, as far as I know.

    I hope this helps.
    Chris
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Problem installing printer, can't seem to get the driver for my printer HP Officejet 4500 G510n-z

    Can't seem to get the driver for my printer HP Officejet 4500 G510n-z... error message is displayed when using the floppy... same error message when trying to install it directly from the HP website for downloads but will not be installed, then uninstall everything... crossed suggested all the patches that were sent as responses to the problem... .very frustrated... somebody please help!  I heard maybe Windows 7 (have the Pro version) may need to be reinstalled... don't really want to go there...

    Error code:

    Error Code of Situation: 17669436

    + 00000000000000042819584 | s | Now Launching = X:\hpzpr|40.exe - inf m

    "preload_productdrivers - I XXX f"X:\hpwins28.dat"- no validation of the.

    -Validate the No.

    SetupINFsListedInDatFile failed with fatal error during installation.

    exit code = 1603

    Do'nt listen to what you have heard - re reinstall

    Its caused by a program or a service that runs on your PC and can be exasipated if you have utilities maintenance party installed, usually called "optimizers" and prevents installation

    Clean, start your PC, http://support.microsoft.com/kb/331796 then try the installer complete on hp site.

    See also to support HP;

    Click 'Start', type in the search field and click 'OK ':

    msiexec /Unregister

    Then follow these steps to temporarily remove all unwanted processes to the system startup:

    «Click 'Start', and type msconfig in the search box-> click on the 'start'-> click on 'Disable All' now-> click on the 'Services' tab-> click on "all Microsoft Services show"-> click on ' disable all '-> click on ' apply 'and' OK '-> you restart PC-> after the restart, it is a request-> confirm you set the hook and click OK.»

    You can activate the process later in the same way (after successful installation of the software).

    Now again click 'Start', type in the search field and click 'OK ':

    msiexec / regserver

    Now launch your attempt to re-setup.

  • Can't seem to get the pass has expired the trial even if I bought a map of the page.

    I use a macbook. I bought the complete student and teachers plan package, but I do not seem to get pass the trial join now expired page. Whenever I have install my creative cloud software I get the free trial of the software and for some, he told me that the trial is expired and it gives me two options, one to Join Now (which I already did; I got a plan) and the other is to put the licensed software, and since I registered online, I don't have a serial number so I don't know where can I use the code. I tried everything, uninstalling and reinstalling software, for signature in both the cloud creative and site software online. I don't know what we can do. I bought this plan last night and I need urgently the software.

    Please try below steps

    Launch any product of creative cloud and click on this software license, then do not choose my Adobe ID and log

    If she always asks the serial number, then check that your hosts file once entries

    Open the link below and see step 3

    Log, activation, or connection errors. CS5.5 and later versions

  • I installed Firefox on my macbook pro and can't seem to get the firefox icon to stay on my Dock. Can you help me?

    This must be a simple process, as I've done it before on other computers-, but the icon in my dock as a "?", I click on, and then it opens on Fox/World icon. As soon as I stop the computer - disappearance of the Firefox icon.

    Hello ajsviridoff,

    Please contact the Mozilla Support. If you run Firefox in Launchpad you get the correct icon in your dock? If she doesn't simply you right-click on the icon, click Options, and then keep in Dock.

    Please let us know if this solves your problem.

    See you soon,.
    Patrick

  • My new HP laptop is running Windows 7. I want to add my printer HP LaserJet 4 L printer but can't seem to get the driver. Help!

    I was able to get the driver and the ut6ilize my HP Laser Jet 4 L printer.  Since my hard drive had to be replaced, I was not able to get the LaserJe6t from HP again 4L printer driver.  Help!

    With the help of a very knowledgeable Microsoft Tech, I was able to get the driver for my printer HP LaserJet 4 L printer.  It is listed on page 6 of 6 Iin the CATALOG.COM UPDATE from MICROSOFT.

    Hope this helps others, I know that this quest for the pilot was long and painful, but my trusty printer prints well!

    Good luck, Pat

  • Get the last inserted into the table, SQL Server Uniqueidentifier

    I'm looking for the code that will make me the last ID entered in a table.  I am using SQL Server and have the ID defined as uniqueidentifiers.  I tried SCOPE_IDENTITY() and had a problem.  I also want to make sure that it is for this unique insert, not an insert that has crept into almost at the same time.

    Thank you!

    NCC

    I'm looking for the code that will make me the last ID entered in a table.  I am using SQL Server and have the ID defined as uniqueidentifiers.  I tried SCOPE_IDENTITY() and had a problem.  I also want to make sure that it is for this unique insert, not an insert that has crept into almost at the same time.

    SCOPE_IDENTITY() only works with identity columns.  If your table does not identity column, it will be of no use to you. Neither will 'result' of cfquery attribute such that it only works with ms sql identity values too.

    As far as I KNOW, there is no method integrated to automatically return a newly created uniqueidentifier.  The closest you can get in MS SQL 2005, without involving triggers, use an OUTPUT clause.

    SET NOCOUNT ON
    INSERT INTO yourTable (ColumnA, ColumnB)
    OUTPUT inserted.yourIDColumn
    VALUES ('foo', 'bar')

    SET NOCOUNT OFF

    Post edited by: == cfSearching == -.

  • Double insert into, how to get the last insert id

    Hi all

    I need to insert some values into 2 tables, and on the second Board, I put the last id inserted in the first table. I actually did more the thing, but it does not work:

    insert into ADDRESS (id, street, neighborhood, zip code, city, idcountry, phonenumber, fax, phone, mail, post number) values (",", ",", ",", "," "," ");
    insert into samplecenter (ID, idaddress, samplecentername) values (", * IDENT_CURRENT ('ADDRESS') *,"GENERAL - CO");

    -What someone could help me.

    Thank you very much.
    Jarod.

    You must use a sequence.

    for example

    create sequence address_seq
    minvalue 1
    maxvalue 1000000000000000
    start with 1
    increment by 1
    nocache;
    
    insert into ADDRESS (id, street, area, zipcode, town, idcountry, phonenumber, faxnumber, gsm, mail, post)
      SELECT
             address_seq.NEXTVAL,'','','', '', '', '', '', '', '', ''
        FROM dual;
    
    insert into samplecenter (ID, idaddress, samplecentername) values ('',address_seq.CURRVAL,'GENERALE - CO');
    
  • CREATING A TRIGGER WHO PICKS UP THE LAST INSERTED RECORD

    Hello everyone


    My question. is it possible to incorporate a SQL whitin a trigger? the thing is that when I have to insert the value, it actually would have to recover from another table. After INSERTION, but he must know what name I inserted in table 1 to also insert it in table 2.

    More precisely. Imagine a table with user names and passwords that I fill like I put them up

    So I need a trigger that if she sees that I entered this username, he takes and fills another table as more a generated sequence that could be the result of a string function

    CREATE OR REPLACE
    GENERATE_SEQUENCE RELAXATION
    AFTER INSERT ON USERS_TABLE
    FOR EACH LINE
    BEGIN
    insert into GENERATED_SEQUENCES_TABLE (lastinserted_name, surrogate_key)
    values (SELECT name from USER OF USERS_TABLE WHERE USERID..., SUBSTR (lastinsertedname¦¦ password), 1.12);
    END;

    so this name of lastinserted is what I'm trying to recover. I mean if not madness to insert an sql query in the way I did, I could write in the query to select the ID of the PK and which would give me the name inserted.


    Thank you very much


    Alvaro

    In an insert trigger you can reference all the insert values with: new.column_name, there is therefore no need to select in the table USERS_TABLE:

    CREATE OR REPLACE
    TRIGGER GENERATE_SEQUENCE
    AFTER INSERT ON USERS_TABLE
    FOR EACH ROW
    BEGIN
    
    insert into GENERATED_SEQUENCES_TABLE (lastinserted_name,surrogate_key)
    values(:new.USERNAME, ...);
    
    END;
    /
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/05/gestione-degli-errori-in-sql-con-log-errors/]

  • I can't seem to get the sound on my computer in the taskbar of bottam he's here and up to 100%

    Don't know what happened, but I have no sound on my computer. I have the microphone in the taskbar and when I click it it is 100% how can I get sound

    HELLO Shirley,
    Here are a few steps that I want you to try:
    If Windows Media Player seems to work fine, but you cannot hear the audio, you will have a problem with your speakers or sound card. Check all audio connections if you are using external speakers and to ensure that sound levels are defined correctly and not cut. Use Device Manager to make sure that your sound card works correctly and is selected as the audio device by default.

    Verification of the sound settings

    Click on Start , then Control Panel
    Select the material and audio and noise
    Under playback.. What icons you see?
    Click Properties and then click headset/speakers
    According to the levels... is at 100% and not CUT?
    Under Advanced... What is the default format?
    Click test... do you get a sound?

    Reinstallation of Windows Media Player

    Go to "turn on or off Windows features.
    * Disable features Media: Windows Media Player
    * Reset
    * Provide characteristic Media: Windows Media Player

    hope this helps,
    Eddie

  • Function of @Allocate can't seem to get the right syntax

    Hi friends,

    I need to make a linear distribution (all equal amounts) of value has prompted at least (for a given combination of year-round version scenario entity etc.)

    I'm yeartotal-quarters and months.

    I can't use the usual period of spread I need produce whole numbers and the standard distribution introduced decimal numbers.

    I thought I'd be able to use @allocate to do something like that, but I'm having trouble him to validate both calcmgr and eas with what I thought was a pretty simple attempt, that is, difficulty on the account will be allocated and relevant narrowing and then assign a value to the range of months using propagation and rounding and applying the difference to the higher member or the first in the range:

    DIFFICULTY (' 21 ',' e080201 ', 'HSP_InputValue', 'FY11","Local","Run business', 'Mensualización 1', "YearTotal")
    @ALLOCATE (12000, @levelmbrs(Period,0), Monto, spread, SKIPNONE, roundAmt,-3, errorsToHigh);
    ENDFIX;
    .

    But I get a syntax error: error: 1012000 syntax not v lida. None are un comando c calculation [@ALLOCATE].

    I'm at my wits end. Anyone know what I'm doing wrong here and if allocate work even for what I try to achieve?

    If not what other submissions do something like this don't you have?

    I need to come up with more later as well guests to make the amount a variable and the range invited as well, but for now if I pass it I'll be happy.

    Agnete

    Hello

    'Re missing you the 4th parameter. Also try to put a member in the left part of the equation.

    Try 'Member' = @ALLOCATE (12000, @levelmbrs(Period,0), Monto, propagation, SKIPNONE, roundAmt,-3, errorsToHigh);

    Note the comma before "propagation."

    Thank you
    JM

  • Can't seem to get the hand cursor happening.

    To the right;

    I struggled to get a hand cursor on my MC for pic4_mc, pic14_mc and pic1_mc. They are processed photos in MC with function to act as a btn as3. Perhaps, I put the script:

    (myMC) .buttonMode = true;

    (myMC) .useHandCursor = true;

    in the wrong place...

    Here is my script for a Web site, that I do... It is perhaps not the right way to do the script, but the feature seems to work (to hand for the cursor hand) so please forgive me if this seems in every sense.

    /////////////////////////////////

    Stop();

    PIC of cleaning services

    pic4_mc.addEventListener (MouseEvent.MOUSE_OUT, fl_MouseOutHandler_5);

    function fl_MouseOutHandler_5(event:MouseEvent):void

    {

    pic4_mc.Alpha = 0.5;

    trace ("Moused over");

    }

    pic4_mc.addEventListener (MouseEvent.MOUSE_OVER, fl_MouseOverHandler_5);

    function fl_MouseOverHandler_5(event:MouseEvent):void

    {

    pic4_mc.Alpha = 1.0;

    trace ("Moused over");

    }

    PIC of the maintenance of the garden

    pic14_mc.addEventListener (MouseEvent.MOUSE_OUT, fl_MouseOutHandler_6);

    function fl_MouseOutHandler_6(event:MouseEvent):void

    {

    pic14_mc.Alpha = 0.5;

    trace ("Moused over");

    }

    pic14_mc.addEventListener (MouseEvent.MOUSE_OVER, fl_MouseOverHandler_6);

    function fl_MouseOverHandler_6(event:MouseEvent):void

    {

    pic14_mc.Alpha = 1.0;

    trace ("Moused over");

    }

    Photo of the handyman

    pic1_mc.addEventListener (MouseEvent.MOUSE_OUT, fl_MouseOutHandler_7);

    function fl_MouseOutHandler_7(event:MouseEvent):void

    {

    pic1_mc.Alpha = 0.5;

    trace ("Moused over");

    }

    pic1_mc.addEventListener (MouseEvent.MOUSE_OVER, fl_MouseOverHandler_7);

    function fl_MouseOverHandler_7(event:MouseEvent):void

    {

    pic1_mc.Alpha = 1.0;

    trace ("Moused over");

    }

    function of home btn

    home_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_9);

    function fl_ClickToGoToAndStopAtFrame_9(event:MouseEvent):void

    {

    gotoAndStop (1);

    }

    Btn cleaning Services function

    pic4_mc.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_6);

    function fl_ClickToGoToAndStopAtFrame_6(event:MouseEvent):void

    {

    gotoAndStop (2);

    }

    Function of garden maintenance btn

    pic14_mc.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_7);

    function fl_ClickToGoToAndStopAtFrame_7(event:MouseEvent):void

    {

    gotoAndStop (3);

    }

    Function of Handyman btn

    pic1_mc.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_8);

    function fl_ClickToGoToAndStopAtFrame_8(event:MouseEvent):void

    {

    gotoAndStop (4);

    }

    quote_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_10);

    function fl_ClickToGoToAndStopAtFrame_10(event:MouseEvent):void

    {

    gotoAndStop (5);

    }

    gallery_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11);

    function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void

    {

    gotoAndStop (6);

    }

    contact_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_12);

    function fl_ClickToGoToAndStopAtFrame_12(event:MouseEvent):void

    {

    gotoAndStop (7);

    }

    /*************************************

    QUOTE FORM

    **************************************/

    sendbtn.buttonMode = true;

    sendbtn.addEventListener (MouseEvent.CLICK, submit);

    resetbtn.buttonMode = true;

    resetbtn.addEventListener (MouseEvent.CLICK, reset);

    init();

    /************************************

    the button behavior

    *************************************/

    /*************************************

    Necessary variables

    **************************************/

    var: timer;

    var varLoad: URLLoader = new URLLoader;

    var urlRequest:URLRequest = new URLRequest ('mail.php');

    urlRequest.method = URLRequestMethod.POST;

    /*************************************

    Functions

    **************************************/

    function init (): void {}

    Set all fields empty

    yourName.text = "";

    fromEmail.text = "";

    yourSubject.text = "";

    YourMsg.text = "";

    }

    function submit(e:MouseEvent):void {}

    Check if a field is empty

    If (yourName.text == ' ' | fromEmail.text == "" |)

    yourSubject.text == ' | YourMsg.text == "")

    {

    Valid.Text = 'all fields should be filled.';

    }

    Check if you are using a valid email address

    else if (! checkEmail (fromEmail.text))

    {

    Valid.Text = "enter a valid email address";

    }

    on the other

    {

    Valid.Text = "Send on the internet..." » ;

    var emailData:String = 'name =' + yourName.text

    + "& from =" + fromEmail.text

    + "& subject = ' + yourSubject.text

    + '& msg =' + YourMsg.text;

    var urlVars:URLVariables = new URLVariables (emailData);

    urlVars.dataFormat = URLLoaderDataFormat.TEXT;

    urlRequest.data = urlVars;

    varLoad.load (urlRequest);

    varLoad.addEventListener (Event.COMPLETE, thankYou);

    }

    }

    function reset(e:MouseEvent):void {}

    init(); call the original function of claire

    }

    function checkEmail(s:String):Boolean

    {

    This tests for correct email address

    var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.) + \w{2,4} +;

    var r: Object = p.exec (s);

    If (r is nothing)

    {

    Returns false;

    }

    Returns true;

    }

    function thankYou(e:Event):void

    {

    var loader: URLLoader = URLLoader (e.target);

    Envoy of var = new URLVariables (loader.data) .sentStatus;

    If (send == 'Yes')

    {

    Valid.Text = "thank you for your e-mail!"

    Timer = new Timer (500);

    timer.addEventListener (TimerEvent.TIMER, msgSent);

    Timer.Start ();

    }

    on the other

    {

    Valid.Text = "Oh no!" Something is wrong! Try again... « ;

    }

    }

    function msgSent(te:TimerEvent):void

    {

    If (timer.currentCount > = 10)

    {

    init();

    timer.removeEventListener (TimerEvent.TIMER, msgSent);

    }

    }

    Kind regards

    Dean

    Google this:

    Flash Player 11.2 r202.233

    Mac OS X 10.7.3 / Safari 5.1.5

    Known issue: the cursor does not change to a hand pointer by positioning the mouse on the TLF links as buttons and clasps active (3060839).

    Try to test Chrome/FF, if the needle shows, its definitely the combination Mac/safari.

  • using stored procedures - I can't seem to get the right settings

    I am wanting to use stored procedures to create variables of substitution use UC4 (Appworx). (the databases I use are 10g) To do this, I first need to run command line in PL/SQL procedures. I don't seem to be able to create the correct command. This is the part of the package that I want to call



    CREATE OR REPLACE
    PACKAGE BODY 'APPLICATION_PACKAGE' AS


    PROCEDURE GET_APP_PARAM (V_APP_PARAM_ID IN CCOK. CC_APP_PARAM_DETAIL. APP_PARAM_ID % TYPE,
    V_APP_PARAM_NAME IN CCOK. CC_APP_PARAM_DETAIL. APP_PARAM_NAME % TYPE,
    OUT NOCOPY CCOK V_APP_PARAM_VALUE. CC_APP_PARAM_DETAIL. APP_PARAM_VALUE % TYPE)


    AS


    BEGIN

    SELECT APP_PARAM_VALUE
    IN V_APP_PARAM_VALUE
    TO CCOK. CC_APP_PARAM_DETAIL
    WHERE APP_PARAM_ID = V_APP_PARAM_ID
    AND APP_PARAM_NAME = V_APP_PARAM_NAME;


    END;




    It's the exact command I use command line

    run application_package.get_app_param(1000,'RUN_TYPE')

    When I do this I get invalid statements expected but still tweaking doesn't fix it and does not give me a clear idea of what I need to do to fix it.
    I get this sort of thing


    SQL & gt; run ccok.application_package.get_app_param(1000,'run_type')
    BEGIN ccok.application_package.get_app_param(1000,'run_type'); END;


    *
    ERROR on line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'GET_APP_PARAM '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored



    SQL & gt; run ccok.application_package.get_app_param(1000,'run_type',:result)
    SP2-0552: Bind variable 'RESULT' undeclared.
    SQL & gt; run ccok.application_package.get_app_param('1000','run_type')
    BEGIN ccok.application_package.get_app_param('1000','run_type'); END;


    *
    ERROR on line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'GET_APP_PARAM '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored



    Any help will be appreciated with more recognition.

    It's interesting.

    Package specification has "GET_APP_PARAM" with 2 parameters.
    The package body has "GET_APP_PARAM" with 3 settings.

    I tested this out case in my db. Oracle balk when the package body is compiled, but shows no errors.

    test@ORA10G> --
    test@ORA10G> DROP PACKAGE "APPLICATION_PACKAGE";
    
    Package dropped.
    
    test@ORA10G>
    test@ORA10G> drop table cc_app_param_detail;
    
    Table dropped.
    
    test@ORA10G> create table cc_app_param_detail (
      2    app_param_id    number(4),
      3    app_param_name  varchar2(20),
      4    app_param_value varchar2(20));
    
    Table created.
    
    test@ORA10G>
    test@ORA10G> insert into cc_app_param_detail
      2  select 1, 'name_1', 'value_1' from dual union all
      3  select 2, 'name_2', 'value_2' from dual union all
      4  select 3, 'name_3', 'value_3' from dual;
    
    3 rows created.
    
    test@ORA10G> commit;
    
    Commit complete.
    
    test@ORA10G>
    test@ORA10G> select * from cc_app_param_detail;
    
    APP_PARAM_ID APP_PARAM_NAME       APP_PARAM_VALUE
    ------------ -------------------- --------------------
               1 name_1               value_1
               2 name_2               value_2
               3 name_3               value_3
    
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> CREATE OR REPLACE PACKAGE "APPLICATION_PACKAGE" AS
      2    PROCEDURE GET_APP_PARAM (
      3      V_APP_PARAM_ID IN TEST.CC_APP_PARAM_DETAIL.APP_PARAM_ID%TYPE,
      4      V_APP_PARAM_NAME IN TEST.CC_APP_PARAM_DETAIL.APP_PARAM_NAME%TYPE);
      5  --    V_APP_PARAM_VALUE OUT NOCOPY TEST.CC_APP_PARAM_DETAIL.APP_PARAM_VALUE%TYPE);
      6  END;
      7  /
    
    Package created.
    
    test@ORA10G> show err
    No errors.
    test@ORA10G>
    test@ORA10G> DESC APPLICATION_PACKAGE
    PROCEDURE GET_APP_PARAM
     Argument Name                  Type                    In/Out Default?
     ------------------------------ ----------------------- ------ --------
     V_APP_PARAM_ID                 NUMBER(4)               IN
     V_APP_PARAM_NAME               VARCHAR2(20)            IN
    
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> CREATE OR REPLACE PACKAGE BODY "APPLICATION_PACKAGE" AS
      2    PROCEDURE GET_APP_PARAM (
      3      V_APP_PARAM_ID    IN TEST.CC_APP_PARAM_DETAIL.APP_PARAM_ID%TYPE,
      4      V_APP_PARAM_NAME  IN TEST.CC_APP_PARAM_DETAIL.APP_PARAM_NAME%TYPE,
      5      V_APP_PARAM_VALUE OUT NOCOPY TEST.CC_APP_PARAM_DETAIL.APP_PARAM_VALUE%TYPE)
      6    AS
      7    BEGIN
      8      SELECT APP_PARAM_VALUE
      9      INTO V_APP_PARAM_VALUE
     10      FROM TEST.CC_APP_PARAM_DETAIL
     11      WHERE APP_PARAM_ID = V_APP_PARAM_ID
     12      AND APP_PARAM_NAME = V_APP_PARAM_NAME;
     13    END;
     14  END;
     15  /
    
    Warning: Package Body created with compilation errors.
    
    test@ORA10G> show err
    No errors.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> var x varchar2(10)
    test@ORA10G> exec test.application_package.get_app_param(1,'name_1',:x);
    BEGIN test.application_package.get_app_param(1,'name_1',:x); END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_APP_PARAM'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    test@ORA10G> print x
    
    X
    --------------------------------
    
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> select object_type, object_name, status from user_objects where object_name='APPLICATION_PACKAGE';
    
    OBJECT_TYPE         OBJECT_NAME                    STATUS
    ------------------- ------------------------------ -------
    PACKAGE             APPLICATION_PACKAGE            VALID
    PACKAGE BODY        APPLICATION_PACKAGE            INVALID
    
    test@ORA10G>
    test@ORA10G>
    

    What do you see as the State of the art and the body when he is interviewed command-line SQL * more?

    The solution would be to add the third parameter to the package specification and recompile.

    HTH,
    isotope

  • I am trying to establish a wireless connection to my printer with my two laptops. I have succeeded with one but can't seem to get the other one connected.

    That connected easily enough.  I'm sure that I'm following the same steps I did with the other laptop, but when I get to the prompt "print test page", nothing happens.

    Hello

    Do both laptop using WIndows XP?

    See the links below and check if it helps.

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/sag_setup_direct_printer.mspx?mfr=true

    http://www.Microsoft.com/windowsxp/using/networking/expert/honeycutt_july2.mspx

Maybe you are looking for

  • Airport Extreme (ME918LL/A) must be Factory Reset after power cycling

    whenever I power cycle the router (at the suggestion of Cox), I end up having to reset completely by holding the small button in the back (for factory reset). after power failure cycling or power (it is on a surge protector) he will be a solid clear

  • No file, but the device is full?

    I have the dreaded "not enough space for music DB Please free 90 MB. I checked the unit and it doesn't have the files but only 2.1 MB free. I deleted the file mtable.sys and looked into the MUSIC folder, there was nothing there, there were once befor

  • Transfer Contacts between old Samsung and Z2

    Hi, does anyone know how to transfer contacts from an old phone Samsung Ch@t 357 (GT-S3570) at a Xperia Z2? I tried to back up contacts on a memory card on Samsung and then using PC companion to transfer them to the Z2, but for some reason, that one

  • Calibri PT 13 fonts in Windows 7 classic does not persist reboots

    Due to some problems of view, classic W7 on a monitor 1920 x 1080 pixels with a resolution of 125%, with 13 Calibri PT. icon and Message fonts, works the best for me.  However, W7 replaces Calibri PT 13. Calibri 14 PT. whenever I have save this theme

  • Can not share the link to the file in creative cloud

    In the past, I shared a folder of photos with different people. He worked for a while, but yesterday people can not download images, receive a message that the file did not exist. So I deleted the public link to the folder and has attempted to create