Item mall for arcturus (error) twilight i need you

Results 1 to 7 of 7
  1. #1
    Enthusiast poreotix is offline
    MemberRank
    Jan 2013 Join Date
    Lumban, Laguna,Location
    29Posts

    ! Item mall for arcturus (error) twilight i need you

    Add item and All Close -
    Warning: mssql_query() [function.mssql-query]: message: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32). (severity 16) in C:\AppServ\www\itemmall.php on line 20

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\AppServ\www\itemmall.php on line 20
    ERROR!


  2. #2
    Valued Member harry12 is offline
    MemberRank
    Jun 2010 Join Date
    148Posts

    Re: Item mall for arcturus (error) twilight i need you

    you really know how to use .php

  3. #3
    Enthusiast poreotix is offline
    MemberRank
    Jan 2013 Join Date
    Lumban, Laguna,Location
    29Posts

    Re: Item mall for arcturus (error) twilight i need you

    Harry tell it to me please :)

  4. #4
    Apprentice bierdopje is offline
    MemberRank
    Apr 2014 Join Date
    21Posts

    Re: Item mall for arcturus (error) twilight i need you

    Would be helpful if you post us the itemmall.php file, or atleast the query...

  5. #5
    Enthusiast poreotix is offline
    MemberRank
    Jan 2013 Join Date
    Lumban, Laguna,Location
    29Posts

    Re: Item mall for arcturus (error) twilight i need you

    <?
    //***** IME - (ITEM MALL ENGINE)******


    //Config----------------------------
    $mysecretfile='LogItemMallProcess.txt';
    $myServer = "127.0.0.1";
    $myUser = "USERNAME";
    $myPass = "PASSWORD";
    $myDB = "SHO";


    echo "Add item and All Close\r\n";
    //Data from FORM------------------
    $AccountName=$_POST['account'];
    echo $AccountName . "-";
    $ItemCode=$_POST['binCODE'];
    echo $ItemCode;
    $conn=mssql_connect($myServer,$myUser,$myPass);
    mssql_select_db($myDB);
    $sql = "exec sp_warehousedeposit "$AccountName","$ItemCode"";
    $res = mssql_query($sql);
    if(!$res) {
    die("ERROR!");
    mssql_close($conn);
    } else {
    mssql_close($conn);
    $f=fopen($mysecretfile,"a");
    fputs($f, "User -".$AccountName." ItemCode - ".$ItemCode."\r\n");
    fclose($f);
    print "Tnx!!!";
    }

  6. #6
    Member hijakob is offline
    MemberRank
    May 2014 Join Date
    81Posts

    Re: Item mall for arcturus (error) twilight i need you

    I can help you out with this. But you need to show the complete code as for there may be an error outside of the form you have pasted here.

    Feel free to send me a PM.


    Hij.

  7. #7
    Apprentice bierdopje is offline
    MemberRank
    Apr 2014 Join Date
    21Posts

    Re: Item mall for arcturus (error) twilight i need you

    Quote Originally Posted by poreotix View Post
    <?
    //***** IME - (ITEM MALL ENGINE)******


    //Config----------------------------
    $mysecretfile='LogItemMallProcess.txt';
    $myServer = "127.0.0.1";
    $myUser = "USERNAME";
    $myPass = "PASSWORD";
    $myDB = "SHO";


    echo "Add item and All Close\r\n";
    //Data from FORM------------------
    $AccountName=$_POST['account'];
    echo $AccountName . "-";
    $ItemCode=$_POST['binCODE'];
    echo $ItemCode;
    $conn=mssql_connect($myServer,$myUser,$myPass);
    mssql_select_db($myDB);
    $sql = "exec sp_warehousedeposit "$AccountName","$ItemCode"";
    $res = mssql_query($sql);
    if(!$res) {
    die("ERROR!");
    mssql_close($conn);
    } else {
    mssql_close($conn);
    $f=fopen($mysecretfile,"a");
    fputs($f, "User -".$AccountName." ItemCode - ".$ItemCode."\r\n");
    fclose($f);
    print "Tnx!!!";
    }
    Your code looks fine although I would change

    $conn=mssql_connect($myServer,$myUser,$myPass);
    mssql_select_db($myDB);

    to

    $conn=mssql_connect($myServer,$myUser,$myPass, $myDB);

    and

    $res = mssql_query($sql);
    if(!$res) {
    die("ERROR!");
    mssql_close($conn);
    } else {
    mssql_close($conn);

    to

    if(!mssql_query($sql))
    die("ERROR!");
    mssql_close($conn);

    Thereby I would highly recommend you to validate your form input (Post data) to prevent
    empty rows in your database or SQL injection, which is possible now.

    However, I don't know what is causing your error. I need more information. It even might be in your database.



Advertisement