I need to update Records - SQL

I seem to get nulls for the underside of Variables in the code.

TOT_TONS: = 3.2 * (BUCK_LOAD - BUCK_RETURN);
TONS_LOAD1: = 3.2 * BUCK_LOAD;
TONS_RETURN: = 3.2 * BUCK_RETURN;

The select statement seem to choose the correct number of records. I don't know why it returns null in the loop. Any help will be much appreciated.


DECLARE
   HOLD_BPT     number;
   TOT_TONS     varchar2(2000);
   BUCK_LOAD    number;
   BUCK_RETURN  number;
   TONS_LOAD    varchar2(2000);
   TON_RET      varchar2(2000); 
   BUCK_TON     number; 
   TONS_LOAD1   number; 
   TONS_RETURN  number;
begin
for rec in 
( 
  Select S.BUCKETS_LOADED, 
         S.BUCKETS_RETURNED,
         S.TONS_LOADED,
         S.TONS_RETURNED,
         S.BUCKETS_PER_TON 
    into 
         BUCK_LOAD,
         BUCK_RETURN,
         TONS_LOAD,
         TON_RET,
         BUCK_TON 
    from SNO.TRUCK S  
  where  S.LOADER_COUNTER = 293
)
loop

 TOT_TONS      :=  3.2 * (BUCK_LOAD - BUCK_RETURN);
 TONS_LOAD1    :=  3.2 * BUCK_LOAD;
 TONS_RETURN   :=  3.2 * BUCK_RETURN;

--dbms_output.put_line(BUCK_TON);

update SNO.TRUCK S
set S.BUCKETS_PER_TON =  3.2,
    S.tons_loaded     =  tons_load1,
    S.tons_returned   =  tons_return,
    S.Total_Tons      =  tot_tons
where 
 S.LOADER_COUNTER = 293;
END LOOP;
END;
{/Code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Hello

Try

DECLARE
BEGIN
  FOR c1 IN
  (SELECT s.buckets_loaded,
    s.buckets_returned,
    s.tons_loaded,
    s.tons_returned,
    s.buckets_per_ton
  FROM sno.truck s
  WHERE s.loader_counter = 293
  )
  LOOP
    UPDATE sno.truck s
    SET s.buckets_per_ton  = 3.2,
      s.tons_loaded        = 3.2 * c1.buckets_loaded,
      s.tons_returned      = 3.2 * c1.buckets_returned,
      s.total_tons         = 3.2 * (c1.buckets_loaded - c1.buckets_returned)
    WHERE s.loader_counter = 293;
  END LOOP;
END;

Kind regards
Jari

Tags: Database

Similar Questions

  • Need add/update two records on click on the create/update button

    I have a table with 5 columns

    1 ID - primary key

    2 name

    3. address

    4 CARB

    5 KADER

    Now whenever I do an insert in this table to this table I have to add two rows, as shown below:

    1st row - (name1, Add1, 717, 717)

    2nd place - (name1, Add1, 515, 515)

    Name and address values are entries of the screen and the CARB & KADER values are fixed (717 or 515). So for each click on the button create two records needs to be inserted.

    Even when I update to say record particular Carb - 717 & kader-717, I must also update other file too Carb-515 & kader-515. For each click on the update button, so I need to update two records.

    Please tell me as to how I will do this

    Hello

    Why do you not use insert manual and update according to your requirement process?... Gives 'Never' for automatic processing of the DML and try to create a manual process (PL/SQL blocks) and give the condition.

    Thank you

    Lacombe

  • Satellite A45: need to update firmware on DVR K12D drive

    Hello...
    IM new here... Well, I have a toshiba > Satellite A45 Series... which had a DVD Multi Drive (DVR K12D) inside. The problem is that his operation stopped. Sometimes she would write a CD then sometimes it spoils my CD. I used on the media player were Verbatin, Imation, Supermedium, Sony.

    Well the reader works as a very short period and then dies OFF... every time I took it to the repair center...

    The drive has been changed now 4times by toshiba support. I asked for the release of Firmware from 1.05 to 1.15 or higher. They keep answering back telling me to ask pioneer. But it is an OEM obvious by toshiba.

    The player after having been changed stops working without delay of 2 to 3 months max 4 months time and den customer tried upgrading the drive by putting a higher config recorder multi disc double tht is the 8 GB one. The satellite detects that hardware.

    been 2 years now my readers send me problems such as:

    does not read DVD
    doeant read CD RW
    don't write CD/DVDs
    sometimes DVD detects any sometimes they detect its weird.

    The only solution is to update the firmware, but how can I do? I need the update of the firmware. I called toshiba WE also, they talked for two hours and then answer that I have to contact pioneer!

    Please help me!

    Vik!

    Hello

    CD/DVD players support generally not all means.
    As far as I know in the manual you will find a list of the CDs and DVDs is supported and it works properly.

    In addition, it seems that this device was designed for an American market and in this case, you should look at the Toshiba Site us.

    I checked this American site:
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/Su/su_sc_home.jsp

    There, I found several notebooks A45 and the necessary drivers. I also found a driver for DVD rom and ram. It s not a firmware update but maybe it helps.

    However, on Toshiba Europe site, I found several updates firmware for the readers and the different European books but as I said at the beginning you have a US laptop and have to look on the American website. If you don't get an update of the firmaware if you ask the manufacturing of the car.

    In addition, I want to say that you can not be sure that, after updating the firmware of the player will not work correctly. This kind of malfunction looks like a defect of lens calibration and therefore only a replacement disc can solve this problem.
    If the drive has been replaced several times so I guess that the guarantee is valid and you will get a new.

  • 64C__Vista 64/security update for SQL server 2005 Service Pack 3 (KB970892) problem code

    I get a request for update update of SQL server 2005, (not even sure if I need the SQL code on my laptop) and it never ends. It errors. It seems to open a box to find a file called (sqlrun_sql.msi) this file does not exist on my system. Unable to reinstall SQL server 2005, it is impossible to uninstall.

    When I try yo install service pack manually the x 86 worm say to use the x 64, x 64 say to use the X 86 worm. ???

    If I do not need SQL server, I would really like to remove it. But how.

    Thanks for any help

    You may find the answer on this forum:

    The SQL Server installation & set program at level
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services

  • C 64 Vista 64/security update for SQL server 2005 Service Pack 3 (KB970892) problem code

    I get a request for update update of SQL server 2005, (not even sure if I need the SQL code on my laptop) and it never ends. It errors. It seems to open a box to find a file called (sqlrun_sql.msi) this file does not exist on my system. Unable to reinstall SQL server 2005, it is impossible to uninstall.

    When I try yo install service pack manually the x 86 worm say to use the x 64, x 64 say to use the X 86 worm. ???

    If I do not need SQL server, I would really like to remove it. But how.

    Thanks for any help

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • Lost password for bbidtoken.csk and the need to update the app on the app world

    Hi guys,.

    I took over the development of an application that we have on the world of the app currently, it's a hybrid application (Córdoba), we then use the Web works to compile...

    Problem is that there is no record of the password for the bbidtoken.csk that was used to sign the application in the first place, and now that I need to update, I can't use a new token as fingerprints do not match.

    Any suggestions please?

    You can check if the BlackBerry ID accounts are looking at the package-author-Id value in the MANIFEST. MF file in the META-INF directory in the file bar.  You can extract the file with a utility like WinZip archives (BAR files are essentially ZIP files).

    If you are unable to find a match with BlackBerry ID accounts that you know send me a private message and I can help you to track down.

  • need to update the value of the column automatically (exists and the new value)

    Hello

    (1) I Segment1, Segment2, Segment3, Segment4, item_status (new column modified in the Temp table)

    Must update the form OFA and the DB Temp table item_status value in the column when I click APPLY to SAVE the Inserted records in the DB table and form and must register the mtl_system_items_b Segment1, Segment2, Segment3, Segment4 in which the condition

    Note: need to update automatically item_status for existing and new inserted records in the Table and the form

     Serializable[] param = {Segment1, Segment2, Segment3, Segment4
                       };
                       am.invokeMethod("InsertRecord", param);
                       row.setAttribute("SelectFlag", "N");
    

    Thank you

    Renon,

    When you write code, try to understand what makes each line. (If you don't understand all the lines, feel free to ask)

    row.setAttribute ("ItemStatus", row.getAttribute ("ItemStatus"));

    What do you think that the above line done? You try to get the value of the attribute and trying to put the same value. How is it, that will have an impact?

    You need to do 2 things.

    1. change the insertRecord method and the State of return of this method.

    Change the definition of the function:

    public String InsertRecord (String itemstyle, String itemcust, String itemsize, String itemcolor, String ordrno,

    String desc)

    Add a return statement at the end after validation.

    TR.Commit ();

    return the situation;

    }

    2 accept that status in CO and set the value to the attribute details VO.

    String status = (String)am.invokeMethod ("InsertRecord", param);

    row.setAttribute ("ItemStatus",status);

    I hope this helps.

    See you soon

    AJ

  • need help to write sql code

    Hi all

    I need to write a sql that retrieves data from the status table and check for this time in the ESHIFT table if the flag was or not. If is there, then it will keep the record as it is Furthermore, there

    did not understand at the time the flag was N suppose ESHIFT table has one record where you N 13:00:01-13:30 then the status register which is 13:00-13:59 min 59 s, we should get 13:00 - 13: records of 00:00 1 and 2 of 13:30:01-13:59 min 59 s

    create table ESHIFT (From_date date, date, to_date, flag varchar2 (2));

    insert into ESHIFT values (' 1 February 12 09:00 ", February 1, 12 13:20 ', 'Y');

    insert into ESHIFT values (' 1 February 12 13:20:01 ", 1 February 12 13:30 ',' don't);

    insert into ESHIFT values (' 1 February 12 13:30:01 ", February 1, 12 16:00 ', 'Y');

    SELECT * from eshift;

    create table status (date of From_date, to_date date, status number);

    insert into values of status (1 February 12 11:00 ', February 1, 12 12:00 ', 1);

    insert into values of status (1 February 12 12:00:01 ', February 1, 12 12:20 ', 2);

    insert into status values ("1 February 12 12:20:01", 1 February 12 12:59:59 ', 1);

    insert into status values ("1 February 12 13:00", February 1, 12 13:59:59 ', 1);

    insert into status values ("1 February 12 14:00", February 1, 12 14:59:59 ', 2);

    SELECT * STATUS;

    In the case above should get sql

    1 FEBRUARY 12 11:00 1ST FEBRUARY 12 12:00 1

    FEBRUARY 1ST, 12 12:00 1ST FEBRUARY 12 12:20 2

    FEBRUARY 1ST, 12 12:20:01, 1 FEBRUARY 12 12:59:59 1

    FEBRUARY 1ST, 12 13:00 1ST FEBRUARY 12 13:20 1

    FEBRUARY 1ST, 12 13:30 1 FEBRUARY 12 13:59:59 1

    FEBRUARY 1ST, 12 14:00 1 FEBRUARY 12 14:59:59 2

    It will be really great if someone can help me how I can get the desired result.

    Thank you very much in advance.

    Please provide instructions creating table and data. It makes it so much easier to answer.

    I think you want:

    Select (s.from_date, e.from_date) greatest from_date, less (s.to_date, e.to_date) to_date, s.status

    s status e eshift join on s.from_date < e.to_date="" and="" s.to_date=""> e.from_date and e.flag = 'Y '.

    order by 1

  • Update record

    I've created a form that allows the user to enter information in a database where each user has a record. Now, I want to create a page that allows the user to update their records. What I've done so far is created a 'my profile page' that the user is able to access once that they identify you that contains all of the information they provided on the registration page. Also on this page, I put a link change so that they stop the "edit my profile page. from there, I created a query of update folder, but when I tested it to see if it worked don't update the database. I do not know where the data is going at this point. Any help would be appreciated.

    Here is the code for my profile page:

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

    <? PHP

    initialize the session

    If (! isset {})

    session_start();

    }

    * Log out the current user. **

    $logoutAction = $_SERVER ['PHP_SELF']. » ? doLogout = true;

    If ((isset & & ($_SERVER ['QUERY_STRING']! = "")) {})

    $logoutAction. = '& '. htmlentities($_SERVER['QUERY_STRING']);

    }

    {If ((isset($_GET['doLogout'])) & & ($ {_GET ['doLogout'] == "true"))}

    //to completely disconnect a visitor you must delete the session varialbles

    $_SESSION ['MM_Username'] = NULL;

    $_SESSION ['MM_UserGroup'] = NULL;

    $_SESSION ['PrevUrl'] = NULL;

    unset($_SESSION['MM_Username']);

    unset($_SESSION['MM_UserGroup']);

    unset($_SESSION['PrevUrl']);

    $logoutGoTo = "logout.php";

    if {($logoutGoTo)

    header ("Location: $logoutGoTo");

    "output";

      }

    }

    ? >

    <? PHP

    If (! isset {})

    session_start();

    }

    $MM_authorizedUsers = "";

    $MM_donotCheckaccess = "true";

    Restrict access to Page: grant or deny access to this page

    Function isAuthorized ($strUsers, $UserGroup, $strGroups, $UserName) {}

    / / For safety, first assuming that the visitor is NOT allowed.

    $isValid = false;

    / / When a visitor is connected to this site, the Session value variable MM_Username equal to their username.

    / / So, we know that a user is NOT logged if this Session variable is empty.

    if (! empty ($UserName)) {}

    / / In addition to be connected, you can restrict access to only certain users based on a created ID when they connect.

    / / Parse strings in the tables.

    $arrUsers = explode (",", $strUsers);

    $arrGroups = explode (",", $strGroups);

    if (in_array ($UserName, $arrUsers)) {}

    $isValid = true;

        }

    / / Or you can restrict access to only certain users based on their user name.

    if (in_array ($UserGroup, $arrGroups)) {}

    $isValid = true;

        }

    if (($strUsers == "") & & true) {}

    $isValid = true;

        }

      }

    return $isValid;

    }

    $MM_restrictGoTo = 'login.php ';

    If (!) ((isset($_SESSION['MM_Username']))) & & (isAuthorized ("", $MM_authorizedUsers, $_SESSION ['MM_Username'], $_SESSION ['MM_UserGroup']))) { }

    $MM_qsChar = ';?

    $MM_referrer = $_SERVER ['PHP_SELF'];

    if (strpos ($MM_restrictGoTo, "?")) $MM_qsChar = "&";

    if (isset($_SERVER['QUERY_STRING']) & & strlen($_SERVER['QUERY_STRING']) > 0)

    $MM_referrer. = « ? ». $_SERVER ['QUERY_STRING'];

    $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar. "accesscheck =". UrlEncode ($MM_referrer);

    header ("Location:".) $MM_restrictGoTo);

    "output";

    }

    ? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    if (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

      }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;   

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

      }

    return $theValue;

    }

    }

    $colname_rsmyprofile = "-1";

    If (isset($_SESSION['register_login'])) {}

    $colname_rsmyprofile = $_SESSION ["register_login"];

    }

    @mysql_select_db ($database_rescue, $rescue);

    $query_rsmyprofile = sprintf ("" SELECT * from user_registration WHERE register_login = %s ", GetSQLValueString ($colname_rsmyprofile,"text")");

    $rsmyprofile = mysql_query ($query_rsmyprofile, $rescue) or die (mysql_error ());

    $row_rsmyprofile = mysql_fetch_assoc ($rsmyprofile);

    $totalRows_rsmyprofile = mysql_num_rows ($rsmyprofile); $colname_rsmyprofile = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_rsmyprofile = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_rescue, $rescue);

    $query_rsmyprofile = sprintf ("" SELECT * from user_registration WHERE register_login = %s ", GetSQLValueString ($colname_rsmyprofile,"text")");

    $rsmyprofile = mysql_query ($query_rsmyprofile, $rescue) or die (mysql_error ());

    $row_rsmyprofile = mysql_fetch_assoc ($rsmyprofile);

    $totalRows_rsmyprofile = mysql_num_rows ($rsmyprofile);

    ? >

    < table width = "591" cellpadding = "2" cellspacing = "2" >

    < class tr = "mainlabels" >

    < td colspan = "4" bgcolor = "#FFFFFF" style = "color: #FFF;" do-family: "Arial Black", Gadget, without serif. do-size: 16px; make-weight: bold; ' > < div align = "left" > < / div > < table >

    < /tr >

    < class tr = "mainlabels" >

    < td colspan = "4" bgcolor = "#FF0000" style = "color: #FFF;" do-family: "Arial Black", Gadget, without serif. do-size: 16px; make-weight: bold; ' > < div align = "left" > news < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" style = "do-size: 12px;" do-family: Arial, Helvetica, without serif. Color: #000; make-weight: normal; ' > < table >

    < class td = "mainlabels" > < table >

    < class td = "mainlabels" > < table >

    < class td = "mainlabels" > < a href = "editmyprofile.php" style ="color: #F00; make-weight: bold; "> < u > < /u > < /a > < table > Edit

    < /tr >

    < tr >

    < td width = "93" class = "mainlabels" style = "do-size: 12px;" do-family: Arial, Helvetica, without serif. Color: #000; make-weight: normal; ' > < div align = "left" > name: < / div > < table >

    < td width = "192" class = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_name"];? > < / div > < table >

    < td width = "107" class = "mainlabels" > < div align = "left" > < / div > < table >

    < td width = "175" class = "mainlabels" > < div align = "left" > < img src = "images/small_logo.jpg" width = "100" height = "25" alt = "Petit Logo" / > < / div > < table > "

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < span class = "mainlabels" > </span > PrimaryEmail: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_pemail"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Second E-mail: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_semail"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > land line: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_phone"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_cellphone"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > user name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_login"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > password: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["register_pass"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < class tr = "mainlabels" >

    < td colspan = "4" bgcolor = "#FF0000" style = "do-family:"Arial Black", Gadget, without serif;" do-size: 16px; color: #FFF; ' > < div align = "left" > Information of emergency Contact < / div > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < table >

    < class td = "mainlabels" > < table >

    < class td = "mainlabels" > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < div align = "left" > Emergency Contact 1 < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con1_name"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Email: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con1_email"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > land line: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con1_land"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con1_cell"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < td rowspan = "2" class = "mainlabels" > < div align = "center" > < img src = "images/emg_contact_btn_edited - 1.png" width = "75" height = "97" alt = "Emergency Contact button" / > < / div > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < div align = "left" > Emergency Contact 2 < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con2_name"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Email: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con2_email"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > landline < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con2_land"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con2_cell"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < div align = "left" > Emergency Contact 3 < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con3_name"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Email: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con3_email"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > land line: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con3_land"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con3_cell"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < div align = "left" > Emergency Contact 4 < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con4_name"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Email: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con4_email"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > land line: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con4_land"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con4_cell"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < td colspan = "2" class = "mainlabels" > < div align = "left" > Emergency Contact 5 < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > name: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con5_name"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > Email: < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con5_email"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > landline < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con5_land"];? > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > cell phone < / div > < table >

    < class td = "mainlabels" > < div align = "left" > <? PHP echo $row_rsmyprofile ["con5_cell"];? > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < class td = "mainlabels" > < div align = "left" > < / div > < table >

    < /tr >

    < tr >

    < class td = "mainlabels" > < table >

    < class td = "mainlabels" > < div align = "center" > < / div > < table >

    < class td = "mainlabels" > < table >

    < class td = "mainlabels" > < table >

    < /tr >

    < /table >

    Here is the code for the update of the folder page:

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

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    if (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

      }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;   

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

      }

    return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "form1")) {}

    $updateSQL = sprintf ("UPDATE user_registration SET register_name = %s register_semail = %s register_pemail = %s, register_cellphone = %s, register_phone = %s, register_login = %s, register_pass = %s WHERE ID = %s",

    GetSQLValueString ($_POST ['register_name'], "text").

    GetSQLValueString ($_POST ['register_semail'], "text").

    GetSQLValueString ($_POST ['register_pemail'], "text").

    GetSQLValueString ($_POST ['register_cellphone'], "text").

    GetSQLValueString ($_POST ['register_phone'], "text").

    GetSQLValueString ($_POST ['register_login'], "text").

    GetSQLValueString ($_POST ['register_pass'], "text").

    GetSQLValueString ($_POST ['ID'], "int"));

    @mysql_select_db ($database_rescue, $rescue);

    $Result1 = mysql_query ($updateSQL, $rescue) or die (mysql_error ());

    $updateGoTo = "myprofile.php;

    if (isset {}

    $updateGoTo. = (strpos ($updateGoTo, '?'))? « & » : « ? » ;

    $updateGoTo. = $_SERVER ['QUERY_STRING'];

      }

    header (sprintf ("location: %s", $updateGoTo));

    }

    $colname_rseditmyprofile = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_rseditmyprofile = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_rescue, $rescue);

    $query_rseditmyprofile = sprintf ("" SELECT * from user_registration WHERE register_login = %s ", GetSQLValueString ($colname_rseditmyprofile,"text")");

    $rseditmyprofile = mysql_query ($query_rseditmyprofile, $rescue) or die (mysql_error ());

    $row_rseditmyprofile = mysql_fetch_assoc ($rseditmyprofile);

    $totalRows_rseditmyprofile = mysql_num_rows ($rseditmyprofile);

    ? >

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > Untitled Document < /title >

    < / head >

    < body >

    < do action = "<?" PHP echo $editFormAction;? ">" method = "post" name = "form1" id = "form1" >

    < table align = "center" >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > name: < table >

    < td > < input type = "text" name = "register_name" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_name'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > main E-mail: < table >

    < td > < input type = "text" name = "register_pemail" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_pemail'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > Second E-mail: < table >

    < td > < input type = "text" name = "register_semail" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_semail'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > cell phone: < table >

    < td > < input type = "text" name = "register_cellphone" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_cellphone'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > land line: < table >

    < td > < input type = "text" name = "register_phone" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_phone'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > user name: < table >

    < td > < input type = "text" name = "register_login" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_login'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > password: < table >

    < td > < input type = "text" name = "register_pass" value = "<?" PHP echo htmlentities ($row_rseditmyprofile ['register_pass'], ENT_COMPAT, ' utf - 8');? ">" size = "32" / > < table >

    < /tr >

    < tr valign = "basic" >

    < td nowrap = "nowrap" align = "right" > < table >

    < td > < input type = "submit" value = "Update file" / > < table >

    < /tr >

    < /table >

    < input type = "hidden" name = "MM_update" value = "form1" / >

    < input type = "hidden" name = "ID" value = "<?" PHP echo $row_rseditmyprofile ['ID'];? ">" / >

    < / make >

    < p > < / p >

    < / body >

    < / html >

    <? PHP

    mysql_free_result ($rseditmyprofile);

    ? >

    This topic has been moved to the Dreamweaver application development forum, which deals with PHP and other issues aside server.

    During the validation of the questions, it is useful to see your code, but he expects many others to trawl through hundreds of lines of code. You say the problem lies in the update page, so why put the profile if it does not work properly? However, in looking at the code of your profile page, it seems incomplete. In any case, we will not go if it doesn't work OK.

    When you describe a problem, it helps if you explain what happens when you load the page. Looking at your code, I'm pretty sure that the details of the user are never loaded in the update form. So, the update record server behavior has no way of knowing that you want to update the record.

    The problem is that you are using $_SESSION ['MM_Username'] to retrieve the details of the user in the rseditmyprofile recordset object, but there is no active session on the page.

    You need to add session_start() at the beginning of the update page. I suggest you add it here:

    
    		   
  • Unable to update record access

    Hello

    I have a page that I use to document the issue of a part of the database.
    It is supposed to create a record in the 'Question' table, documenting the reduction of parts (that part works)
    It is also supposed to increment the amount of part in the 'Main_Table' table by an update record server behavior.

    This is the part that doesn't work. I enclose the code in this CFM file (sorry, its a little long...) Any ideas what I'm doing wrong here?

    Thank you in advance,

    Eric

    PS You can see the actual page at: http://devo.dns2go.com/Issue.cfm?PartNumber=1234 & Contract = Aries % 201 X
    You will need to log in. Use Name: user password: user

    Thank you very much for the help. For the base of the other viewing this thread, I am attaching the labour code. When the Send button is enabled, the data is updated in the table and a new record is written to the Main_Table table.

    Thank you

    Eric

  • Need help with query SQL Inline views + Group

    Hello gurus,

    I would really appreciate your time and effort on this application. I have the following data set.

    Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
    1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 20.00 *---19
    1234567 11223 - 05/07/2008 - 44345563 -a--10,00---19 ofbad quality adjustment
    7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
    4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19

    Please ignore '-' added for clarity

    I'm writing a paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, aggregate query Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Type, Invoice_Number, Vendor_Number. When there are no more records I want to display the respective Description.

    The query should return the following data set

    Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
    1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 10.00 *---19
    7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
    4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19
    Here's my query. I'm a little lost.

    Select b., A.sequence_id, A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
    de)
    Select sequence_id, check_number, check_date, invoice_number, sum (paid_amount) sum, vendor_number
    of the INVOICE
    Sequence_id group check_date, check_number, invoice_number, vendor_number
    ) A, B OF INVOICE
    where A.sequence_id = B.sequence_id


    Thank you
    Nick

    It seems that this is a duplicate thread - correct me if I am wrong in this case->

    Need help with query SQL Inline views + Group

    Kind regards.

    LOULOU.

  • Just installed Mac OS Sierra on Mac Pro air. What I do need to update to Safari and other applications on the iPhone and I have the carpet?

    Just installed Mac OS Sierra on Mac Pro air.

    What I do need to update to Safari and other applications on the iPhone and I have the carpet?

    Unless otherwise indicated by an application or in the description of an update, no.

    (144880)

  • need to update to 10.11.6 10.10.2; required to have 10.11 first; Cannot find 10.11 download anywhere?

    need to update to 10.11.6 10.10.2; required to have 10.11 first; Cannot find 10.11 download anywhere?

    El Capitan

  • I do need to update Firefox if I run Waterfor?

    I run Waterfox (just updated). When I look at plugins, modules, etc., the site says that Firefox is not updated. I do need to update Firefox as well as Waterfox?

    Waterfox can look like Firefox to many sites due to the way in which he gives an account of his identity. In this message, your browser sent:

    Mozilla/5.0 (Windows NT 6.1; Win64; x 64; ( rv:40.0) Firefox/40.1.0 Gecko/20100101 Waterfox/40.1.0

    By comparison, sends Firefox (32-bit):

    Mozilla/5.0 (Windows NT 6.1; WOW64; ( rv:42.0) Gecko/20100101 Firefox/42.0

    As many sites probably overlook the Waterfox part.

    If you use Firefox it should update itself, or you can use the help > about Firefox to trigger an update check. But if you're not using Firefox, there is no urgent need to update.

    I don't know why Waterfox is so far behind in updates, but...

  • I have Quicktime 7, but when I try to open iTunes I get a message saying that I need to update Quicktime 7.5.5. How to do this?

    I have Quicktime 7, but when I try to open iTunes I get a message saying that I need to update Quicktime 7.5.5. How to do this?

    Click here to install or run the software update from the system preferences panel.

    (143939)

Maybe you are looking for

  • How do I downgrade to the previous version? This version (29.0.1) is terrible!

    I would go back to the previous version that was simpler and more intuitive.The system of bookmarks is terrible (like the expansion of programs in Windows 95 menu when you press the Start button) it is possible to pin the window in the sidebar, but w

  • Do not charge the external battery ThinkPad T440

    Hello community, I use a T440 with WIN8.1 machine pro, but for some reason any external battery stopped charging. This laptop is only 3 months old Lenove send me a brand new, but the result was the same, the charging symbol appears on my screen when

  • IdeaPad U310 Touch one finger scrolling

    Hello I finally decided to upgrade my old Ideapad Y550 of 4 years and I'm pretty happy with my U310 so far. One thing I would change however, the habit of a scroll using my Y550 finger and I would have this return. Is it possible in the U310 to displ

  • Fix installation problem: "the update does not apply to your system.

    Greetings and thanks for reading. Currently, I am trying to fix a problem of high performance mouse. During the game, the mouse staggers moving (or 'looking', through the mouse) left or right . I tried two different mouse and the problem persists. Th

  • Alpha or Alpha?

    Dell, I did once my resolution to never buy an OEM desktop computer once again, however the Alienware Alpha has my eyes. On paper, I'm a perfect fit for the ideal library of consumer of Alpha of indie and first access games steam. I like the game on